/rpy topic usage


I want to improve the navigation accuracy of my Rosbot and I think the /rpy topic can be very useful for that.
Can you please give me a method that should be the best way (or almost one) to merge this /rpy topic with /odom topic ?

Thanks for help

Hello Baptiste,

The most common method to fuse position estimate from various sources is Extended Kalman Filter.
There is a package for that: robot_pose_ekf.
Please note, that robot_pose_ekf needs different message type than is published by ROSbot, you will need to adjust that.


Hello Łukasz,

Thanks for the proposal, it can actually do the job.

I’m trying an other way for testing the more efficient solution and I’ve got a problem, I want to convert directly into the CORE2 the rpy vector into quaternion by using the tf::createQuaternionFromRPY function like described in the tf: tf Namespace Reference

The buid failed because ‘createQuaternionFromRPY’ is not a member of ‘tf’.

I don’t understand what happen and I don’t found the tf.h library into the hFramework git repository .
Can you give me more explanations about how to use the tf functions into the CORE2 ?

Thanks a lot for support.


Hi Baptiste

you can find an example here in the main.cpp files of the sub folders.


Hi Michael,

Your example seems to be about the createQuaternionFromYaw function, it works well, no problem with that.
What I’m trying to use is the createQuaternionFromRPY function, like described in its documentation
tf: tf Namespace Reference


The createQuaternionFromYaw is part of the Husarion SDK (include/hROS/tf). I think this is included in the build process.So I assume if you need more functions from tf you must reimplement them yourself.


Hello Baptiste and Michael,

Husarion SKD is using rosserial for handling ROS communication, thus you can find there all methods that are offered by rosserial.
On the other hand, rosserial has limited functionality so it can fit to various microcontrollers. You can check implementation of tf for rosserial here.

If you need to use createQuaternionFromRPY(), you need to implement it on your own.