ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
I solved the problem, but I can’t say that I understand why it works, as I saw the data published to the correct topics. Still my solution was to wait (e.g. 5s), after setting up the publisher, before publishing.
# Setting up publishers
pSP = rospy.Publisher("/shoulder_pan_joint_position_controller/command", Float64, queue_size=1)
...
time.sleep(5)
# Test
MoveJnt([1.57, -1.57, 1.57, 0.0, 1.57, -1.57]) #move joints using the above publishers
time.sleep(1.5)
MoveJnt([1.57, -1, 1, 0.0, 1.57, -1.57])