ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
If your posted code matches what you're running, it looks like you're publishing the wrong variable. You're trying to publish the armj_acc
array directly, rather than the msg2send10
message. I'm also not sure that you're allowed to assign a time directly to the header field like you've shown.
Try this:
def talker(armj_acc) :
pub10 = rospy.Publisher('/armj_acc', obs_arm_JointAccelerations)
msg2send10 = obs_arm_JointAccelerations()
msg2send10.header.stamp = rospy.Time.now()
msg2send10.accelerations = armj_acc
pub10.publish(msg2send10)