0
$\begingroup$

Rosanswers logo

I am trying to publish odometry data from a STM32-F446re over serial and using rosserial_python for subscribing/publishing.

Since odometry messages are very big to transfer over serial, I only want to publish pose and twist without covariance matrices and would like to construct odom topic at the host side (add covariance at the host side).

How can I merge pose and twist messages to create a odom message?


Originally posted by pmundt on ROS Answers with karma: 13 on 2017-08-12

Post score: 0


Original comments

Comment by ahendrix on 2017-08-12:
If both of these messages are coming from the same source, it might be easier to define a custom message that contains a pose and a twist so that you can publish that on a single topic, and then write a node which converts that into a full odom message.

Comment by pmundt on 2017-08-12:
Other than creating a custom message and writing a node, can I achieve this with using any tool (like any topic_tools feature)?

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

To the best of my knowledge there is no such tool for automated merging of messages. As in your case a fair amount of additional information would need to be filled (i.e. covariances) your best bet is writing a small node yourself. You could also consider creating a custom message that contains all the data you need in compressed/minimal form (i.e. only transmit yaw angle and x,y etc.). I've taken a similar approach (albeit in the PC -> Arduino direction) for transmitting motion commands: DiffDriveCommand is the minimal pwm message sent over rosserial and the translator node takes care of translating ROS commands (joystick or Twist) to the minimal representation.


Originally posted by Stefan Kohlbrecher with karma: 24361 on 2017-08-13

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by pmundt on 2017-08-13:
Thank you very much for giving me a starting point.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.