/cmd_vel timeout? #516
-
How are you connecting to your Create 3?Wi-Fi (ROS 2) Computer(s) Model(s) and Operating System(s)Ubuntu 22.04 in Docker over Raspberry Pi 5 PiOS Bookworm Which version of ROS 2 is installed on your computer?Humble Which firmware version is installed on your robot?H.2.4 Which RMW is your robot running?FastRTPS Does your robot have an assigned namespace? If so, please share.No response Is the robot connected to a network? If so, what is the network type?Yes: 2.4GHz Home WiFi Are there multiple Create 3 robots connected to your network?No Is multicast enabled?Yes What is the Adapter Board's USB/BLE Toggle currently switched to?Bluetooth (default) Describe your question.Is there more documentation on the Create3 implementation of the /cmd_vel topic? All I found was the listing of the topic with its type. I understood the affect on /cmd_vel of /safety_override, hazards, and max_acceleration and max_speed, but I did not understand there is a timeout. Did I miss the discussion of the timeout somewhere in the docs? My program spins with a 10Hz timer, and it seems that republishing the desired /cmd_vel at this rate is sufficient for smooth motion, but I actually had to undo a bunch of "if already published, don't publish every cycle" code from my original design to keep performing the motion I desired. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
the /cmd_vel topic is subscribed to by the diff-drive-controller I presume, nothing specific to the create3. |
Beta Was this translation helpful? Give feedback.
-
The Create 3 As you noticed, the node has indeed a timeout duration of 0.5 seconds. I'll add this information to the docs. |
Beta Was this translation helpful? Give feedback.
The Create 3
/motion_control
node executes a 20Hz loop where it checks for the last received message on the/cmd_vel
topic and forwards it to the wheels.The frequency of this loop is not a parameter.
As you noticed, the node has indeed a timeout duration of 0.5 seconds.
If the last
/cmd_vel
message is older than the timeout, then the message will be considered stale and the robot will stop until a new message arrives.This timeout is currently exposed as a parameter named
wheels_stop_threshold_sec
.This parameter is "read-only", i.e. after the application has started you can't change it, however it can be modified via the ROS 2 parameter yaml exposed by the webserver https://iroboteducat…