Closed daisukes closed 4 years ago
The main loop of serial_node.py waits 1 millisecond with rospy.sleep(0.001) after receiving a message from serial here.
rospy.sleep(0.001)
This is okay without simulation, but gazebo_ros publishes clock in 100 Hz and let serial_noe.py wait 10 milliseconds after each message.
My Arduino publishes 4 different messages in 50 Hz (total 200 Hz) and got sync error when I run it with gazebo (use_sim_time=true).
Is it possible to change it to time.sleep(0.001)?
time.sleep(0.001)
That sounds reasonable— Gazebo would have no control over whatever is on the other end of a rosserial connection, so there'd be no reason to alter its view of time. Please send a PR.
The main loop of serial_node.py waits 1 millisecond with
rospy.sleep(0.001)
after receiving a message from serial here.This is okay without simulation, but gazebo_ros publishes clock in 100 Hz and let serial_noe.py wait 10 milliseconds after each message.
My Arduino publishes 4 different messages in 50 Hz (total 200 Hz) and got sync error when I run it with gazebo (use_sim_time=true).
Is it possible to change it to
time.sleep(0.001)
?