Robotics StackExchange | Archived questions

How is turtlebot3 able to transfer 5 different msgs with 115200 baud rate?

Hey,

I am going through the code of turtlebot3_core on ROBOTIS-GIT/OpenCR git page.

The turtlebot3 is publishing 5 different msgs which are; TransformStamped, SensorState, Imu, Odometry and JointState.

The message sizes are;

The total size of the publishing msgs are around 644bytes (if I am not wrong about the sizes). In turtlebot3coreconfig.h, I saw that the publish are 30Hz and for IMU it is 200Hz. The total baud rate needed is way up more than 115200. How does turtlebot3 achive this? What am I missing here?

Asked by pmundt on 2017-08-05 06:16:38 UTC

Comments

Could you do a 'rostopic bw' for the topics?

Asked by NEngelhard on 2017-08-05 08:05:14 UTC

I do not have a turtlebot3 with me right now, so I am running the same code on a STM32F446re. /tf mean is 0.10KB (1.0KB/s), /joint_states mean is 147.00B (13.0B/s), /odom mean is 700B (45.5 B/s). And serial_node.py is giving a warning "wrong checksum for topic id and msg".

Asked by pmundt on 2017-08-05 09:01:28 UTC

In theory, the total publishing msgs sizes are way more up than 115000 baud for turtlebot3? Am I wrong?

Asked by pmundt on 2017-08-05 09:02:58 UTC

I see no obvious error on your side. Can you generate a bag file?

Asked by NEngelhard on 2017-08-05 10:37:29 UTC

AFAIK, if the transfer is via USB serial, the data rate is always fullspeed USB 12MB/S. The advertised baud rate is for information and legacy compatibility only. But I have no citation to support that.

Asked by slomobile on 2017-08-05 14:38:55 UTC

I think I just found how turtlebot3 achives that msgs transfer rate. OPENCR msgs are using float32, while ROS msgs are using float64. So as I understood, OPENCR msgs are nearly half the size. For example, OpenCR/vector3 using float32 and ros/vector3 is using float64.

Asked by pmundt on 2017-08-05 17:07:11 UTC

For example, OpenCR/vector3 vs Ros/vector3

Asked by pmundt on 2017-08-05 17:07:57 UTC

OPENCR msgs are using float32, while ROS msgs are using float64.

sed -i 's/OPENCR/rosserial/g'. wiki/rosserial/Overview/Limitations.

Asked by gvdhoorn on 2017-08-06 03:47:09 UTC

Interesting... I haven't really looked into the network throughput, but I'm just wondering whether all msgs are published at the exact same time. Publish functions in the OpenCR code cannot be executed at the same time aren't they?

Asked by Will Son on 2017-11-08 04:01:42 UTC

As I mentioned, 115200 bps was not enough to publish all data. But I was able to run the code succesfully with 1Mbps baudrate rate.

Asked by pmundt on 2017-11-08 05:07:48 UTC

Answers