ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

JointState msgs in ROS are typically only used for reporting the state of joints, not for commanding them / sending new setpoints (I know of some exceptions, but am not sure whether I would call that a 'recommended' practice).

For executing trajectories, you'll want to look into setting up a FollowJointTrajectory action server-client pair. See control_msgs for the action definition (specifically: FollowJointTrajectory). See joint_trajectory_action for an old / the PR2 implementation (you probably don't want to use that node, but it does help to understand JointTrajectory action server interaction).

For newer setups, I would perhaps look at ros_control, and then specifically at the joint_trajectory_controller. That exposes the required interfaces, and also allows you to work with Gazebo simulated robots and real hardware (almost) seamlessly.

JointState msgs in ROS are typically only used for reporting the state of joints, not for commanding them / sending new setpoints (I know of some exceptions, but am not sure whether I would call that a 'recommended' practice).

For executing trajectories, you'll want to look into setting up a FollowJointTrajectory action server-client pair. See control_msgs for the action definition (specifically: FollowJointTrajectory). See joint_trajectory_action for an old / the PR2 implementation (you probably don't want to use that node, but it does help to understand JointTrajectory action server interaction).

For newer setups, I would perhaps look at ros_control, and then specifically at the joint_trajectory_controller. That exposes the required interfaces, and also allows you to work with Gazebo simulated robots and real hardware (almost) seamlessly.seamlessly (through gazebo_ros_control).