MapGraph erroneous values

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

MapGraph erroneous values

Alexandru Iftimie
Hello,

I have the following issue. I am receiving the queue of positions from /rtabmap/mapGraph topic and I am printing the last position as msg->poses[msg->poses.size()-1].position.x where msg is rtabmap_ros::MapGraph::ConstPtr& msg. I also saw that the queue size is around 1168 or 1167 at every callback.

The problem is that after a few iterations I am receiving the same value (X: 3.2539, Y: 0.1011) and stays the same:
[ INFO] [1516450466.736030983]: X: 3.2539, Y: 0.1011
[ INFO] [1516450469.008419694]: X: 7.0402, Y: -1.8379
[ INFO] [1516450471.215271046]: X: 7.2952, Y: -1.9157
[ INFO] [1516450474.581330863]: X: 7.7645, Y: -2.1201
[ INFO] [1516450476.820938780]: X: 7.9940, Y: -2.2687
[ INFO] [1516450479.014667179]: X: 8.2806, Y: -2.4271
[ INFO] [1516450482.348890209]: X: 3.2539, Y: 0.1011
[ INFO] [1516450484.565644060]: X: 3.2539, Y: 0.1011
[ INFO] [1516450486.822069202]: X: 3.2539, Y: 0.1011
[ INFO] [1516450489.022773286]: X: 3.2539, Y: 0.1011
[ INFO] [1516450490.185171840]: X: 3.2539, Y: 0.1011
[ INFO] [1516450492.377422002]: X: 3.2539, Y: 0.1011
[ INFO] [1516450494.598734897]: X: 3.2539, Y: 0.1011

The map that I am testing is large and I think that it is feature-less. Also it takes some time to calibrate its positions when starting. I have to run keyboard_teleop.


Does anyone have any idea why this is happening?
Thank you
Reply | Threaded
Open this post in threaded view
|

Re: MapGraph erroneous values

Alexandru Iftimie
I also have the problem that it does not always listen to the 2DNavGoal commands from RViz and it enters the walls. Also the Rviz position is correctly updated. Is there another topic that has robot positions?
Thank you
Reply | Threaded
Open this post in threaded view
|

Re: MapGraph erroneous values

matlabbe
Administrator
Hi,

If the robot is not moving, the last pose will stay the same. For 2D nav goal, it is more a move_base issue. move_base won't allow a plan if the robot is already colliding an obstacle. You can also show in RVIZ the costmaps used by move_base to make plans, you will see if the inflation radius is under the robot.

For more help, we will need to know what is the sensor setup/robot/launch file...

cheers,
Mathieu
Reply | Threaded
Open this post in threaded view
|

Re: MapGraph erroneous values

Alexandru Iftimie
The problem is that the robot is constantly moving, the position is updated correctly in Rviz, but from time to time I get from /rtabmap/MapGraph topic those values (3.2539, 0.1011).

The configuration of the robot is the following: Turtlebot with Orbbec Astra and RPlidar A1.

In demo_turtlebot_mapping.launch I added the following lines as I remember:
<node pkg="tf" type="static_transform_publisher" name="link1_broadcaster" args="0 0 0 0 0 0 base_footprint laser 100"/>
<remap from="/rtabmap/goal_out" to="/move_base_simple/goal"/>

And I start the rtabmap node in localization mode:
roslaunch rtabmap_ros demo_turtlebot_mapping.launch wait_for_transform:=1 localization:=true

From my last post I decided to give up taking X Y values from /rtabmap/MapGraph topic and now I am taking the values from nav_msgs/local_costmap/costmap. Is that topic reliable?

Thank you
Reply | Threaded
Open this post in threaded view
|

Re: MapGraph erroneous values

matlabbe
Administrator
Hi,

In localization mode, the graph will not change. You may not use /rtabmap/MapGraph to know current position of the robot, but TF instead. Get TF between /map and /base_footprint for example to know current position of the robot in /map frame. Use /odom -> /base_footprint to know its position in /odom frame.
$ rostopic tf tf_echo map base_footprint

cheers,
Mathieu