rosserial_arduino best practice for messages [closed]
Hi there,
I plan to bring my Arduino robot to ROS and I'm curious about the best was to send sensor messages, error codes and events. My plan is to use cmd_vel messages to drive around which is straight forward.
But what is the best way to send data back to ROS? How to raise bumper events, sonar, IMU and odometry data? I plan to stream raw data for odometry and so on and do the calculation in a ros node to translate the raw data into default ros nodes.
- So is it best to send a complex message containing all sensor values (approx 30 different values) every 100ms?
- or is it better to use smaller messages (one for odometry, one for sonar etc.) and send them every 100ms or if needed?
- is it good practice to raise events (bumper hit, battery event etc.) by a single message or should I create multiple event messages, one for each event?
As Arduino (Mega) only provides a few kB of storage and is slow I'm curious if it can handle large messages or a lot of small messages reliable.
I've looked to so many tutorials but didn't find a more complex one.
Any hints on how I should set it up?
Patrick