Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AMCL failing when starting Navigation Simulation #884

Closed
5 of 28 tasks
johnpenright opened this issue Jul 4, 2022 · 8 comments
Closed
5 of 28 tasks

AMCL failing when starting Navigation Simulation #884

johnpenright opened this issue Jul 4, 2022 · 8 comments

Comments

@johnpenright
Copy link

johnpenright commented Jul 4, 2022

ISSUE TEMPLATE ver. 0.4.0

  1. Which TurtleBot3 platform do you use?

    • Burger
    • Waffle
    • Waffle Pi
  2. Which ROS is working with TurtleBot3?

    • ROS 1 Kinetic Kame
    • ROS 1 Melodic Morenia
    • ROS 1 Noetic Ninjemys
    • ROS 2 Dashing Diademata
    • ROS 2 Eloquent Elusor
    • ROS 2 Foxy Fitzroy
    • ROS2 Humble Hawksbill
    • etc (Please specify your ROS Version here)
  3. Which SBC(Single Board Computer) is working on TurtleBot3?

    • Intel Joule 570x
    • Raspberry Pi 3B+
    • Raspberry Pi 4
    • Gazebo Simulation
    • etc (Please specify your SBC here)
  4. Which OS you installed on SBC?

    • Raspbian distributed by ROBOTIS
    • Ubuntu MATE (16.04/18.04/20.04)
    • Ubuntu preinstalled server (18.04/20.04)
    • Gazebo Simulation
    • etc (Please specify your OS here)
  5. Which OS you installed on Remote PC?

    • Ubuntu 16.04 LTS (Xenial Xerus)
    • Ubuntu 18.04 LTS (Bionic Beaver)
    • Ubuntu 20.04 LTS (Focal Fossa)
    • Windows 10
    • MAC OS X (Specify version)
    • Windows 10 + WSL2 + Ubuntu 22.04 (Jammy)
    • etc (Please specify your OS here)
  6. Specify the software and firmware version(Can be found from Bringup messages)

    • Software version: [x.x.x]
    • Firmware version: [x.x.x]
  7. Specify the commands or instructions to reproduce the issue.

    Running Gazebo simulation tutorials (https://emanual.robotis.com/docs/en/platform/turtlebot3/simulation/). Following Foxy instructions, adapted for Humble. The Gazebo process loads fine,

ros2 launch turtlebot3_gazebo turtlebot3_world.launch.py

but starting the Navigation node gives constant errors.

ros2 launch turtlebot3_navigation2 navigation2.launch.py use_sim_time:=True map:=$HOME/map.yaml

  1. Copy and Paste the error messages on terminal.

[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [component_container_isolated-1]: process started with pid [23605]
[INFO] [rviz2-2]: process started with pid [23607]
[rviz2-2] QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-XXXX'
[component_container_isolated-1] [INFO] [1656947648.761198200] [nav2_container]: Load Library: /opt/ros/humble/lib/libmap_server_core.so
[component_container_isolated-1] [INFO] [1656947648.772121000] [nav2_container]: Found class: rclcpp_components::NodeFactoryTemplate<nav2_map_server::MapSaver>
[component_container_isolated-1] [INFO] [1656947648.772207400] [nav2_container]: Found class: rclcpp_components::NodeFactoryTemplate<nav2_map_server::MapServer>
[component_container_isolated-1] [INFO] [1656947648.772218600] [nav2_container]: Instantiate class: rclcpp_components::NodeFactoryTemplate<nav2_map_server::MapServer>
[component_container_isolated-1] [INFO] [1656947648.791938300] [map_server]:
[component_container_isolated-1] map_server lifecycle node launched.
[component_container_isolated-1] Waiting on external lifecycle transitions to activate
[component_container_isolated-1] See https://design.ros2.org/articles/node_lifecycle.html for more information.
[component_container_isolated-1] [INFO] [1656947648.792181200] [map_server]: Creating
[INFO] [launch_ros.actions.load_composable_nodes]: Loaded node '/map_server' in container 'nav2_container'
[component_container_isolated-1] [INFO] [1656947648.794432300] [nav2_container]: Load Library: /opt/ros/humble/lib/libcontroller_server_core.so
[component_container_isolated-1] [INFO] [1656947648.801186100] [nav2_container]: Found class: rclcpp_components::NodeFactoryTemplate<nav2_controller::ControllerServer>
[component_container_isolated-1] [INFO] [1656947648.801249400] [nav2_container]: Instantiate class: rclcpp_components::NodeFactoryTemplate<nav2_controller::ControllerServer>
[component_container_isolated-1] [INFO] [1656947648.819238500] [controller_server]:
[component_container_isolated-1] controller_server lifecycle node launched.
[component_container_isolated-1] Waiting on external lifecycle transitions to activate
[component_container_isolated-1] See https://design.ros2.org/articles/node_lifecycle.html for more information.
[component_container_isolated-1] [INFO] [1656947648.822637400] [controller_server]: Creating controller server
[component_container_isolated-1] [INFO] [1656947648.844968400] [local_costmap.local_costmap]:
[component_container_isolated-1] local_costmap lifecycle node launched.
[component_container_isolated-1] Waiting on external lifecycle transitions to activate
[component_container_isolated-1] See https://design.ros2.org/articles/node_lifecycle.html for more information.
[component_container_isolated-1] [INFO] [1656947648.846113600] [local_costmap.local_costmap]: Creating Costmap
[INFO] [launch_ros.actions.load_composable_nodes]: Loaded node '/controller_server' in container 'nav2_container'
[component_container_isolated-1] [INFO] [1656947648.850663300] [nav2_container]: Load Library: /opt/ros/humble/lib/libamcl_core.so
[component_container_isolated-1] [INFO] [1656947648.854148000] [nav2_container]: Found class: rclcpp_components::NodeFactoryTemplate<nav2_amcl::AmclNode>
[component_container_isolated-1] [INFO] [1656947648.854220200] [nav2_container]: Instantiate class: rclcpp_components::NodeFactoryTemplate<nav2_amcl::AmclNode>
[component_container_isolated-1] [INFO] [1656947648.879898300] [amcl]:
[component_container_isolated-1] amcl lifecycle node launched.
[component_container_isolated-1] Waiting on external lifecycle transitions to activate
[component_container_isolated-1] See https://design.ros2.org/articles/node_lifecycle.html for more information.
[component_container_isolated-1] [INFO] [1656947648.881185400] [amcl]: Creating
[INFO] [launch_ros.actions.load_composable_nodes]: Loaded node '/amcl' in container 'nav2_container'
[component_container_isolated-1] [INFO] [1656947648.891174900] [nav2_container]: Load Library: /opt/ros/humble/lib/libsmoother_server_core.so
[component_container_isolated-1] [INFO] [1656947648.893372400] [nav2_container]: Found class: rclcpp_components::NodeFactoryTemplate<nav2_smoother::SmootherServer>
[component_container_isolated-1] [INFO] [1656947648.893433000] [nav2_container]: Instantiate class: rclcpp_components::NodeFactoryTemplate<nav2_smoother::SmootherServer>
[component_container_isolated-1] [INFO] [1656947648.917418500] [smoother_server]:
[component_container_isolated-1] smoother_server lifecycle node launched.
[component_container_isolated-1] Waiting on external lifecycle transitions to activate
[component_container_isolated-1] See https://design.ros2.org/articles/node_lifecycle.html for more information.
[component_container_isolated-1] [INFO] [1656947648.919195000] [smoother_server]: Creating smoother server
[INFO] [launch_ros.actions.load_composable_nodes]: Loaded node '/smoother_server' in container 'nav2_container'
[component_container_isolated-1] [INFO] [1656947648.923147100] [nav2_container]: Load Library: /opt/ros/humble/lib/libnav2_lifecycle_manager_core.so
[component_container_isolated-1] [INFO] [1656947648.925091500] [nav2_container]: Found class: rclcpp_components::NodeFactoryTemplate<nav2_lifecycle_manager::LifecycleManager>
[component_container_isolated-1] [INFO] [1656947648.925170100] [nav2_container]: Instantiate class: rclcpp_components::NodeFactoryTemplate<nav2_lifecycle_manager::LifecycleManager>
[component_container_isolated-1] [INFO] [1656947648.947317800] [lifecycle_manager_localization]: Creating
[INFO] [launch_ros.actions.load_composable_nodes]: Loaded node '/lifecycle_manager_localization' in container 'nav2_container'
[component_container_isolated-1] [INFO] [1656947648.953012500] [lifecycle_manager_localization]: Creating and initializing lifecycle service clients
[component_container_isolated-1] [INFO] [1656947648.953177800] [nav2_container]: Load Library: /opt/ros/humble/lib/libplanner_server_core.so
[component_container_isolated-1] [INFO] [1656947648.954279100] [nav2_container]: Found class: rclcpp_components::NodeFactoryTemplate<nav2_planner::PlannerServer>
[component_container_isolated-1] [INFO] [1656947648.954312500] [nav2_container]: Instantiate class: rclcpp_components::NodeFactoryTemplate<nav2_planner::PlannerServer>
[component_container_isolated-1] [INFO] [1656947648.963689900] [lifecycle_manager_localization]: Starting managed nodes bringup...
[component_container_isolated-1] [INFO] [1656947648.963886500] [lifecycle_manager_localization]: Configuring map_server
[component_container_isolated-1] [INFO] [1656947648.964236100] [map_server]: Configuring
[component_container_isolated-1] [INFO] [map_io]: Loading yaml file: /home/john/map.yaml
[component_container_isolated-1] [DEBUG] [map_io]: resolution: 0.05
[component_container_isolated-1] [DEBUG] [map_io]: origin[0]: -1.25
[component_container_isolated-1] [DEBUG] [map_io]: origin[1]: -2.41
[component_container_isolated-1] [DEBUG] [map_io]: origin[2]: 0
[component_container_isolated-1] [DEBUG] [map_io]: free_thresh: 0.25
[component_container_isolated-1] [DEBUG] [map_io]: occupied_thresh: 0.65
[component_container_isolated-1] [DEBUG] [map_io]: mode: trinary
[component_container_isolated-1] [DEBUG] [map_io]: negate: 0
[component_container_isolated-1] [INFO] [map_io]: Loading image_file: /home/john/map.pgm
[component_container_isolated-1] [DEBUG] [map_io]: Read map /home/john/map.pgm: 125 X 116 map @ 0.05 m/cell
[component_container_isolated-1] [INFO] [1656947648.979475000] [lifecycle_manager_localization]: Configuring amcl
[component_container_isolated-1] [INFO] [1656947648.979708000] [amcl]: Configuring
[component_container_isolated-1] [INFO] [1656947648.979922200] [amcl]: initTransforms
[component_container_isolated-1] [INFO] [1656947649.000404200] [planner_server]:
[component_container_isolated-1] planner_server lifecycle node launched.
[component_container_isolated-1] Waiting on external lifecycle transitions to activate
[component_container_isolated-1] See https://design.ros2.org/articles/node_lifecycle.html for more information.
[component_container_isolated-1] [INFO] [1656947649.002212500] [planner_server]: Creating
[component_container_isolated-1] [INFO] [1656947649.002235100] [amcl]: initPubSub
[component_container_isolated-1] [INFO] [1656947649.016361600] [amcl]: Subscribed to map topic.
[component_container_isolated-1] [ERROR] [1656947649.025091400] []: Caught exception in callback for transition 10
[component_container_isolated-1] [ERROR] [1656947649.025157400] []: Original error: According to the loaded plugin descriptions the class differential with base class type nav2_amcl::MotionModel does not exist. Declared types are nav2_amcl::DifferentialMotionModel nav2_amcl::OmniMotionModel
[component_container_isolated-1] [WARN] [1656947649.025191400] []: Error occurred while doing error handling.
[component_container_isolated-1] [FATAL] [1656947649.025208800] [amcl]: Lifecycle node amcl does not have error state implemented
[component_container_isolated-1] [ERROR] [1656947649.025527500] [lifecycle_manager_localization]: Failed to change state for node: amcl
[component_container_isolated-1] [ERROR] [1656947649.025559700] [lifecycle_manager_localization]: Failed to bring up all requested nodes. Aborting bringup.

  1. Please describe the issue in detail.

The above failure in configuring AMCL seems to be the key issue. Here are a few other observations:

  • The rViz window appears but does not show the map.
  • Then I get a constant flow of error messages:

[component_container_isolated-1] [INFO] [1656947652.365148100] [global_costmap.global_costmap]: Timed out waiting for transform from base_link to map to become available, tf error: Invalid frame ID "map" passed to canTransform argument target_frame - frame does not exist

  • Using the view_frames tool, the map node is missing

Maybe this has something to do with the Navigation changes between Foxy and Humble (https://navigation.ros.org/migration/Galactic.html)?

@johnpenright
Copy link
Author

So I've made some progress. In the robot param file (waffle_pi.yaml), if I change line 29 from

robot_model_type: "differential"

to

robot_model_type: "nav2_amcl::DifferentialMotionModel"

then rViz will launch and initialize properly.

However I don't seem to be getting a local costmap, even though rViz is confugured to display one. I'm not seeing any clear errors in the logs.

@johnpenright
Copy link
Author

After additional digging, it seems like this is related to a known issue with the FastDDS middleware.

There's a temporary fix here or you can install cyclonedds.

@quyetbt2000
Copy link

Hi, Thanks for your solution, I'm in the same issue, any explanation for that change?
After following your instruction, any solution to get a local costmap back ?

@johnpenright
Copy link
Author

Hi, Thanks for your solution, I'm in the same issue, any explanation for that change? After following your instruction, any solution to get a local costmap back ?

I don't think I needed to do anything specific; I just switched over to the cyclonedds.

@quyetbt2000
Copy link

I got
"Message Filter dropping message: frame 'base_scan'/'odom' at time 24.074 for reason 'discarding message because the queue is full'". Is it any way to fix it in src file, and not switch to cyclonedds ( I have no idea about this)

ncdejito added a commit to ncdejito/ros2-nav2-example that referenced this issue Sep 7, 2022
@ncdejito
Copy link

ncdejito commented Sep 7, 2022

switch to cyclonedds with

sudo apt install ros-<ros-distro>-rmw-cyclonedds-cpp
vim ~/.bashrc
export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp # insert this line
source ~/.bashrc

when you do ros2 launch, check on separate terminal using ps -eo cmd, should show cyclonedds in --rmw-implementation:

21318 22.0  0.6 535896 55044 pts/8    Sl   16:14   0:00 /usr/bin/python3 /opt/ros/humble/bin/_ros2_daemon --rmw-implementation rmw_cyclonedds_cpp --ros-domain-id 22

source

@sea-bass
Copy link

sea-bass commented Oct 29, 2022

So I've made some progress. In the robot param file (waffle_pi.yaml), if I change line 29 from

robot_model_type: "differential"

to

robot_model_type: "nav2_amcl::DifferentialMotionModel"

then rViz will launch and initialize properly.

However I don't seem to be getting a local costmap, even though rViz is confugured to display one. I'm not seeing any clear errors in the logs.

Just a heads-up : Even with CycloneDDS, this failed until I fixed the AMCL configuration as above ^^^

According to the official Nav2 documentation, there is a note saying:

Note for users of galactic and earlier
The models are selectable by string key (valid options: “differential”, “omnidirectional”) rather than plugins.

... which is why that everyone going to Humble has this broken. So, we should be using nav2_amcl::DifferentialMotionModel. Will put up a PR.

@johnpenright
Copy link
Author

sea-bass,

Your results seem to be consistent with my experience. Fixing the AMCL configuration allowed the demo to run, but I didn't get a cost-map without the changing the DDS. This should be a relatively simple PR to resolve.

brean added a commit to brean/ros2-turtlebot3-remote-pc-docker that referenced this issue Jan 20, 2023
brean added a commit to brean/ros2-turtlebot3-gazebo-docker that referenced this issue Jan 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants