CartesianPoseController
A controller which drives a Cartesian pose of a target_frame toward a target pose given relative to a specified base_frame.
NOTE: This controller requires a controller_manager update_rate of at least 500Hz.
Usage
Create an entry in your controllers.yaml and add it to your launch file infrastructure. Set
base_frameandtarget_frameaccordingly. Do not activate on startup.Activate the controller -> It claims the position (and, if
command_velocitiesis true, also velocity) interfaces of all joints betweenbase_frameandtarget_frame.Publish a target pose -> The end effector should now move towards it, respecting the configured cartesian velocity/acceleration limits.
Configuration example
cartesian_pose_controller:
ros__parameters:
base_frame: "base_link"
target_frame: "flange"
command_velocities: true
limits:
velocity:
linear: 1.0
angular: 6.283
acceleration:
linear: 2.0
angular: 12.566
Interaction
Publish target poses relative to base_frame on /<topic_prefix>/<target_frame>/<target_topic_suffix> (geometry_msgs/msg/PoseStamped).
If topic_pub_frequency is greater than zero, the current target pose/twist relative to base_frame are published on /<topic_prefix>/<target_frame>/pose and /<topic_prefix>/<target_frame>/twist.
topic_prefix defaults to the controller name if left empty.
Parameters
Name |
Description |
Default |
Bounds |
|---|---|---|---|
|
Name of the base frame |
|
- |
|
Name of the target frame to be controlled |
- |
may not be empty |
|
Exponential target filter time constant [s] |
0.1 |
[0.0, 10.0] |
|
If true, also claims and commands the joints’ velocity interface |
true |
- |
|
Maximum linear velocity [m/s] |
1.0 |
[0.0, 10.0] |
|
Maximum angular velocity [rad/s] |
6.283 |
[0.0, 62.83] |
|
Maximum linear acceleration [m/s^2] |
2.0 |
[0.0, 100.0] |
|
Maximum angular acceleration [rad/s^2] |
12.466 |
[0.0, 628.3] |
|
Prefix to all topics. If empty, the controller name is used |
- |
- |
|
Suffix added to the target frame topic for receiving control inputs |
|
- |
|
Frequency of the published end effector pose/twist topics. Zero disables publishing |
10.0 |
[0.0, 1000.0] |
Debug parameters
Name |
Description |
Default |
Bounds |
|---|---|---|---|
|
Enable ros2control introspection for internal state monitoring |
false |
- |
|
If true, the controller will not claim command interfaces |
false |
- |
Expert-only parameters
Name |
Description |
Default |
Bounds |
|---|---|---|---|
|
Filter weight for the joint velocity feedback. 0 disables it |
0.001 |
[0.0, 1.0] |
|
Time horizon [s] used to scale the IK solver’s joint displacement variable |
0.01 |
[0.001, 1.0] |
|
Weight to dampen all joint motions and stabilize the IK solution |
0.01 |
[0.000001, 1.0] |
|
Correlation between linear (one meter) and angular (one revolution) errors in the IK solver |
25.0 |
[1.0, 100.0] |
|
Precision of the inverse kinematics solver |
0.0001 |
[0.000001, 0.1] |
|
Maximum number of iterations for the inverse kinematics solver |
10 |
[3, 30] |
Notes
Every joint not on the direct path between
base_frameandtarget_frameis treated as fixed.A correctly configured URDF is needed (correct frame names and joint types).
This controller only support hinge (revolute) joints to be controlled.