HebiRobotics / HEBI-ROS-DEPRECATED

HEBI ROS Examples/API/etc.
19 stars 19 forks source link

Add ROS time stamps to published JointState messages #92

Closed josephcoombe closed 6 years ago

josephcoombe commented 6 years ago

Added to support common ROS (visualization) tools that parse the JointState.Header.time field.


e.g. rosrun rqt_plot rqt_plot /hebiros/GROUP_NAME/feedback/joint_state/effort[1]

^ fyi, rqt_plot has an known issue caused by a failure to distinguish between namespaces and fields - causing this example to fail sometimes since hebiros defines a feedback msg.

See: https://github.com/ros-visualization/rqt_plot/issues/7

Not suggesting you should change that. Just mentioning it.

josephcoombe commented 6 years ago

Eventually, we may want to use the simulation time from gazebo, but I think this is good for now.

If you set the /use_sim_time param to True before launching a ROS Node (note: that parameters designated in a launch file are loaded before launching nodes), then ROS Time will be the same as simulation time.

See: http://wiki.ros.org/Clock#Using_Simulation_Time_from_the_.2BAC8-clock_Topic