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

The error message explains quite clearly what is going wrong:

You have to publish std_msgs::Float64 messages instead of trajectory_msgs::JointTrajectoryPoint.

The following should work:


ros::Publisher a1_a2_pub = p.advertise<std_msgs::float64>("/kuka/a1_a2_joint_position_controller/command", 1000);
while(ros::ok())
{
std_msgs::Float64 msg;
msg.data = 1.0;
a1_a2_pub.publish(msg);
rate.sleep();
}