0
$\begingroup$

I am currently working on a GPS-based navigation solution to send latitude and longitude (converted to odom local coordinate system by navsat_transform_node) as a goal pose and use the Nav2 stack to avoid obstacles. However, I face some challenges when setting a goal pose using SLAM.

Problem: When I set a goal pose for my Ackerman-steered vehicle, it only steers and does not move forward.

A) I ran without using SLAM (Normal behavior without using SLAM): pre-mapped goal pose

B) This behavior can be checked in this video: slam goal pose

C) If I use an opened world (without obstacles), slam also does not work with goal pose (neither slam-toolbox initializes the mapping process), and the steering wheels behavior is repeated as can be checked here: slam empty world. In this launch file, I've commented on the robot localization and navsat nodes (to let slam work exclusively without amcl or other sensors data that might interfere with this functionality), and the result was the same...

Details:

  • /cmd_vel Output:

    linear: x: 0.0 y: 0.0 z: 0.0 angular: x: 0.0 y: 0.0 z: 1.0

  • /goal_pose Output:

header: stamp: sec: 0 nanosec: 0 frame_id: map pose: position: x: -93.0 y: -1.39 z: 3.35 orientation: x: 0.0 y: 0.0 z: 0.0 w: 1.0

Questions:

  1. What configurations or parameters should we know when using SLAM with the Nav2 stack for goal pose setting? I've checked something related here: slam_toolbox enabled, however, my launch file is quite similar, just modified the robot type (Ackerman) and added some robot localization nodes (fused odometry + Imu + gps using navsat)

  2. How can I debug the path planner to understand why it's not generating a path? The output of my /plan topic is empty!

    ros2 topic echo /plan

  3. Are there any known issues or incompatibilities between SLAM and the Nav2 stack's Ackerman-based path planner that might be causing this behavior??

  4. Has the community developed a ros2 GPS integration tutorial with nav2? I know this one for ros1-nav1: https://www.youtube.com/watch?v=cmOplaq8cHc. I would be glad to receive a link tutorial!

Any guidance or suggestions would be greatly appreciated. Thank you!

$\endgroup$

1 Answer 1

0
$\begingroup$

Some important context: SLAM is largely unrelated to navigation, it only provides key parts of the TF tree and the map for use in navigating the environment. It your application is correctly setup, the difference between localization and SLAM should be nothing from Nav2's perspective.

"Goal pose setting" is just rudimentary navigation which works both in many users' applications and our CI testing on a daily basis without issue. I say that to give you reference that this is a working and largely unrelated feature as evidenced by our automated testing which evaluates these features and our real-world users. The specific robot kinematics of Ackermann definitely are not related since Ackermann doesn't relate to the map nor especially TF2.

Perhaps consider looking at your costmap parameters - our website (https://navigation.ros.org/) gives you really detailed parameter guides that should make it straight forward to potentially see where your configurations have gone wrong. The only thing I can imagine is that you're not processing the map and/or costmap in the correct ways (since its unlikely to be a TF2 issue if you don't see terminal logs complaining).

My best guess would be that you don't have it set to allow for exploring unknown spaces since your sensor coverage is so poor and thus the map is not densely populated? I won't speculate about all of the potential modifications you've made to our defaults which could have caused issues. But that's one such way -- but like I said, please reference the documentation, that's why its there :-)

$\endgroup$
1
  • $\begingroup$ Thanks for suggestion, the unknow exploration was correct, but I needed to adjust inflation values costmap configuration and tweaked the resolution in mapper_params.online_sync.yaml,etc. However, I'm facing a shaking behavior in the truck during SLAM. This isn't due to GPS fusion but the initial odom+imu fusion in the EKF. I've previously resolved a similar issue by commenting out the joint states publisher in the SDF. Could there be another underlying issue related to the EKF configurations? No idea this time why using robot_loc_node is causing this youtube.com/watch?v=cQSPgZathSU $\endgroup$ Aug 14, 2023 at 5:32

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.