ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
You need an output buffer large enough to hold all messages published between calls to spinOnce()
. (When you call spinOnce()
, all queued, published messages are sent, and incoming messages are retrieved into the input buffer.) If you are publishing several messages before calling spinOnce()
you could be running out of buffer space. You might try inserting more calls to spinOnce()
, perhaps after every Odometry
message. (It's a round-trip handshake to the host, but might make the code work.)
On a Mega you're probably OK memory-wise. I'm working with a 2kb Arduino-compatible, and have abandoned rosserial
because of the large memory footprint. I second the suggestion of ros_arduino_bridge
as an alternative.
2 | No.2 Revision |
You need an output buffer large enough to hold all messages published between calls to spinOnce()
. (When you call spinOnce()
, all queued, published messages are sent, and incoming messages are retrieved into the input buffer.) If you are publishing several messages before calling buffer.)spinOnce()
you could be running out of buffer space. You might try inserting more calls to spinOnce()
, perhaps after every Odometry
message. (It's a round-trip handshake to the host, but might make the code work.)
On a Mega you're probably OK memory-wise. I'm working with a 2kb Arduino-compatible, and have abandoned rosserial
because of the large memory footprint. I second the suggestion of ros_arduino_bridge
as an alternative.