ROS-I joint_path_command triggers robot only after sending the message twice
I am trying to control an ABB 6640 robot through the motion download interface (see here -> 1.3.3 Motion Control -> Subscribed Topics).
With a python publisher (built as described here) I publish the following message to the topic /joint_path_command
:
header: seq: 0 stamp: secs: 0 nsecs: 0 frame_id: '' joint_names: [joint_1, joint_2, joint_3, joint_4, joint_5, joint_6] points: - positions: [0, 0, 0, 0, 0, 0] velocities: [] accelerations: [] effort: [] time_from_start: secs: 0 nsecs: 0
I also tried sending the current position of the robot as the first waypoint, but in either way the robot will ignore the first message it is sent. It will only move if the message is send once more after waiting for a little amount of time. Sending the duplicate immediately after the first message will not make it move.
[Edit] The code sending the message:
#!/usr/bin/env python from trajectory_msgs.msg import * import rospy def test(): pub = rospy.Publisher('/joint_path_command',JointTrajectory,queue_size=2) rospy.init_node('joint_path_command_test',anonymous=True) rate = rospy.Rate(1) #while not rospy.is_shutdown(): for i in range(2): msg = JointTrajectory() msg.joint_names = ["joint_1","joint_2","joint_3","joint_4","joint_5","joint_6"] target=JointTrajectoryPoint() target.positions=[0,0,0,0,0,0] msg.points = [target] rospy.loginfo(msg) pub.publish(msg) rate.sleep() if __name__ == '__main__': try: test() except rospy.ROSInterruptException: pass
I am running ROS Kinetic Kame in an Ubuntu 16.04 64-bit VM.
The Windows host runs a Robot Studio instance with a simulated ABB IRB 6640 robot that was prepared as described in the 3 tutorials here. For controlling it I run roscore
and roslaunch abb_irb6640_support robot_interface_download_irb6640_185_280.launch robot_ip:=...
What do I need to change to make the robot listen on the first message sent as well?