Anyone who has ever written SLAM or Localization codes?

asked 2019-10-18 00:10:26 -0500

kane_choigo gravatar image

Hi, I'm using ROS kinetic on Ubuntu 16.04.

My current work is making ROS package kinds of using the SLAM algorithm.

In the SLAM algorithm, I have to update not only pose but also the velocity of landmarks or mobile robots.

Generally, people use geometry_msg/PoseWithCovariance and geometry_msg/TwistWithCovariance to save topic data.

A state covariance in the SLAM algorithm usually consists of XYZ position and roll, pitch, yaw angle, (in topic message, they should be converted to a type of Querternion) AND velocities.

But as you know, there is no message kinds of covariance covering pose and velocity simultaneously as far as I know.

So I have no choice but to update PoseWithCovariance with any of velocities. How can I find the proper solution to my current problem?

Thank you :)

edit retag flag offensive close merge delete

Comments

You can define your own message type that contains one PoseWithCovariance and one TwistWithCovariance and include it with your package.

Jari gravatar image Jari  ( 2019-10-18 00:38:40 -0500 )edit

It's a little bit of abuse of the namesake but nav_msgs/Odometry will do what you're asking. As Jari points out, describing a new message is also a routine action if there's not a message that easily fits your application and its encouraged.

stevemacenski gravatar image stevemacenski  ( 2019-10-19 00:32:42 -0500 )edit