To sum thing up, the controller file arm_controller_ur3.yaml
is follows:
arm_controller:
type: position_controllers/JointTrajectoryController
joints:
- shoulder_pan_joint
- shoulder_lift_joint
- elbow_joint
- wrist_1_joint
- wrist_2_joint
- wrist_3_joint
constraints:
goal_time: 0.6
stopped_velocity_tolerance: 0.05
shoulder_pan_joint: {trajectory: 0.1, goal: 0.1}
shoulder_lift_joint: {trajectory: 0.1, goal: 0.1}
elbow_joint: {trajectory: 0.1, goal: 0.1}
wrist_1_joint: {trajectory: 0.1, goal: 0.1}
wrist_2_joint: {trajectory: 0.1, goal: 0.1}
wrist_3_joint: {trajectory: 0.1, goal: 0.1}
stop_trajectory_duration: 0.5
state_publish_rate: 25
action_monitor_rate: 10
joint_group_position_controller:
type: position_controllers/JointGroupPositionController
joints:
- shoulder_pan_joint
- shoulder_lift_joint
- elbow_joint
- wrist_1_joint
- wrist_2_joint
- wrist_3_joint
where arm_controller
and joint_group_position_controller
is just controller names, which can be whatever you like. The main difference here is arm_controller
use JointTrajectoryController
, so you can control the robot with trajectory messages computed from trajectory planners etc. While joint_group_position_controller uses JointGroupPositionController
to control the robot's joint by directly sending values to controller manager.
To work with arm_controller
, you have to understand message type trajectory_msgs/JointTrajectoryPoint
, to define a movement of robot through time. While in joint_group_position_controller
, you can simply specify each joint a value (no time involve)
What is arm_controller?
In universal_robot/ur_gazebo/arm_controller_ur3.yaml there are two different controllers defined: arm_controller and joint_group_position_controller
arm_controller used for trajectory
position_controllers/JointTrajectoryController
, whilejoint_group_position_controller
is for group of joint controllers (position_controllers/JointGroupPositionController
). Basically, arm_controller control the robot by trajectory calculated from planning, while joint_group_position_controller can control the robot follow manually user's input.If you want to control robot's joint, such as
shoulder_pan_joint=0.1
, you can do that by sending command to topic, then joint_group_position_controller is the one you want to focus on. If you want to automatically compute trajectory given goal target pose, then arm_controller is the one you will work with.Ok thank you very much. That cleared up things. If you post it as an answer than I can mark it as the correct answer.
this is actually only partially correct.
The main use-case for the
JointTrajectoryController
is to execute pre-calculated trajectory_msgs/JointTrajectory. Thecommand
topic does indeed accept individualJointTrajectoryPoint
s, but I would consider that secondary functionality.@gvdhoorn I totally agree with you. My answer emphasizes more on the difference in application scenarios rather than functionalities. Quite like a personal trick to remember things :)
well if that's the case then wouldn't the biggest difference be that a
JointTrajectoryController
can execute trajectories while aJointGroupPositionController
cannot and is only used for forwarding single position setpoints to a group of joints?