0
$\begingroup$

Rosanswers logo

Hi I was able to solve "partially" the related issue AMCL Fails to localize.

I've been working on improving localization for my custom Ackermann robot in an environment scaled 7-12 times the size of the standard turtlebot world. However, I've encountered a couple of issues.

  1. Localization Anomalies: Despite the environment scale, the AMCL particles appear much smaller and less dispersed than when applied to the turtlebot3. I've adjusted several parameters in my nav2_params.yamll file, but the issue persists. How can I increase the size and spread of these particles?

Here's a video: AMCL Particles too Small illustrating the issue, and a screenshot of my RQT Graph for reference.

2.Trajectory Planning: Despite nodes and topics from the planner server and recover_server appearing correctly, the trajectory is not being calculated or drawn in RVIZ. The topics /goal_pose and /plan do not receive any data from the trajectory planner. Could the small AMCL particles be causing this issue?

I've verified that my RVIZ configurations (Costmaps, TF, footprint, maps) and Gazebo plugins (publishing odom TF, Lidar, camera) seem to be functioning correctly, as illustrated in the following image:

image description

I appreciate an assistance in this issue.


Originally posted by Vini71 on ROS Answers with karma: 266 on 2023-05-18

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

I've been experiencing a rather vexing issue with the localization and planning for my Ackermann type vehicle using Nav2. Initially, the problem seemed to be related to the particle size; however, upon changing the image resolution, I managed to get the size of particles similar to the turtlebot tutorial. Now, I'm beginning to suspect that the planning issue might be connected to the costmap and Lidar, as suggested by the repeated warnings I've received:

[rviz2-4] [INFO] [1684557117.532457854] [rviz]: Message Filter dropping message: frame 'odom' at time 18.718 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
[controller_server-8] [WARN] [1684557117.542791989] [local_costmap.local_costmap]: Sensor origin at (4.15, -0.01 2.18) is out of map bounds (34.12, 29.97, 2.95) to (-14.95, -14.95, 0.00). The costmap cannot raytrace for it
9.98, 2.95) to (-14.95, -14.95, 0.00). The costmap cannot raytrace for it.
[controller_server-8] [WARN] [1684557296.342507914] [local_costmap.local_costmap]: Sensor origin at (4.19, 0.00 2.18) is out of map bounds (34.17, 29.98, 2.95) to (-14.95, -14.95, 0.00). The costmap cannot raytrace for it.
[controller_server-8] [WARN] [1684557296.542695295] [local_costmap.local_costmap]: Sensor origin at (4.19, 0.00 2.18) is out of map bounds (34.17, 29.98, 2.95) to (-14.95, -14.95, 0.00). The costmap cannot raytrace for it.
[controller_server-8] [WARN] [1684557296.742759887] [local_costmap.local_costmap]: Sensor origin at (4.19, 0.00 2.18) is out of map bounds (34.17, 29.98, 2.95) to (-14.95, -14.95, 0.00). The costmap cannot raytrace for it.
[controller_server-8] [WARN] [1684557296.942633179] [local_costmap.local_costmap]: Sensor origin at (4.19, 0.00 2.18) is out of map bounds (34.17, 29.98, 2.95) to (-14.95, -14.95, 0.00). The costmap cannot raytrace for it.
[controller_server-8] [WARN] [1684557297.142774081] [local_costmap.local_costmap]: Sensor origin at (4.19, 0.00 2.18) is out of map bounds (34.17, 29.98, 2.95) to (-14.95, -14.95, 0.00). The costmap cannot raytrace for it.
[controller_server-8] [WARN] [1684557297.342435994] [local_costmap.local_costmap]: Sensor origin at (4.19, 0.00 2.18) is out of map bounds (34.17, 29.98, 2.95) to (-14.95, -14.95, 0.00). The costmap cannot raytrace for it.
[controller_server-8] [WARN] [1684557297.542871713] [local_costmap.local_costmap]: Sensor origin at (4.19, 0.00 2.18) is out of map bounds (34.17, 29.98, 2.95) to (-14.95, -14.95, 0.00). The costmap cannot raytrace for it.
^C[WARNING] [launch]: user interrupted with ctrl-c (SIGINT)

I I believe that there might be a misconfiguration issue with costmap parameters (size, height, width) as the Lidar is mapping correctly and localization appears functional. I am yet to find a solution for this


Update:

I've made some progress and managed to resolve the costmap issue. The solution involved using a static transform publisher from base_link to Lidar. Interestingly, even though my joint state publisher is functioning correctly, this redundant step was required, which deviates from the turtlebot tutorial.

However, it's important to note that the placement of my Lidar is not directly attached to the base_link, but to other children from base_link. The costmap is highly sensitive to offset in the Z-axis. For instance, running "ros2 static publisher 0 0 0.3 0 0 0 0 base_link lidar_link" would raise a costmap error. Yet, the costmap doesn't seem to raise issues even when x and y offsets can reach up to 15 meters.

After running the node with the launch file, I can use the "Set Goal Pose" icon on Rviz and see the desired goal spot coordinates on Terminal. But the planner doesn't draw on Rviz or calculate anything, it just freezes.

As a provisional fix, I've been manually setting the pose and goal coordinates using the ros2 launch action. This method helps to draw the planner in Rviz, but the controller can't move my truck (presumably set for lighter robots). It only steers the wheels without forward movement.

To overcome this, I provide a starting linear velocity via teleop, and the truck then follows the drawn path. Unfortunately, both the localization (AMCL) and Costmap do not travel along with the vehicle, leading to the truck losing its location very quickly.

Adjusting an Ackermann Robot to use Nav2 has been a struggle, and despite following all the documentation and paid course steps, the performance remains unsatisfactory.

I hope this information can assist other researchers or students facing similar issues, and any further help or suggestions for improvement would be greatly appreciated.


Originally posted by Vini71 with karma: 266 on 2023-05-19

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

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