roslibpy messages not being processed by gazebo

asked 2021-02-11 05:23:42 -0600

pratipo gravatar image


I have a python script running in blender 2.83, which uses roslibpy 1.2 to connect and send a trajectory_msgs/JointTrajectory to rosbridge_server

apparently I cannot generate a properly built message

I have a simulated robot arm in gazebo rostopic pub /arm_controller/command trajectory_msgs/JointTrajectory '{joint_names: ["joint_1","joint_2","jnt_3","joint_4", "joint_5", "joint_6"], points: [{positions:[0.1,-0.5,0.5,0.75,0.0,0.0], time_from_start: [1.0,0.0]}]}' -1 works as expected rostopic echo /arm_controller/command displays the messages and gazebo reproduces the motion

this is how i generate the message

# ...
msg = dict(header=roslibpy.Header(seq=i,, frame_id='base'), 
           joint_names=["joint_1","joint_2","joint_3","joint_4", "joint_5", "joint_6"], 
           points=[dict( positions=[1.0,0.0,2.0,0.0,1.0,1.0], 
           # velocities=[1,1,1,1,1,1], # accelerations=[], # effort=[], 
           time_from_start=[1.0,0.0])], ) 

rostopic echo /arm_controller/command displays the messages again and, but gazebo is not moving the arm

if i remove the time stamp in the header of the message i get and error in gazebo so it seems to be reaching gazebo

any ideas? thanks a lot in advance


OS: ubuntu 18.04
Python version 3.7.4 (blender built-in)
edit retag flag offensive close merge delete