ROS2 Navigation: Unreliable movement, Message dropping/Failed update rate/Extrapolation error

asked 2021-10-13 15:02:20 -0500

philmurp gravatar image

Running into an issue with Autonomous navigation using Foxy on ROS2 Nav2, Linorobot2 packages:

So I am running Launch->Teleop_twist->SLAM->Navigation_2 launch files. I am getting error on my Launch command window:

Failed to meet update rate! Took ...seconds. Try decreasing the rate, limiting sensor output frequency or limiting the number of sensors.

And this error on my SLAM command window:

Message filter dropping message: frame 'laser' at time ... for reason unknown

And these errors in my Navigation command window:

Transform data too old when converting from odom to map

Data time: ..., Transform time...

Unable to transform robot pose into global plan's frame

Extrapolation error looking up robot pose: Lookup would require extrapolation into the past

I think that is why in RVIZ the Navigation = Active but Localization = Inactive, so the robot does sometimes move but seems to not be following a good path or avoiding obstacles.

I read a few article that said it was related to passing odom to map at same time, or that I should put a pause into the launch file. But these linorobot2 files all seems pretty default from compared to ROS wikis so not sure how to change them.

edit retag flag offensive close merge delete

Comments

Sounds like you either have too little compute, not updating odometry fast enough, setting unrealistic update rates, or some mixture of above. You have to provide more context and specifics.

stevemacenski gravatar image stevemacenski  ( 2021-10-13 18:48:20 -0500 )edit

Thanks, what kind of specifics would you be looking for to help?

Running this on Jetson Nano 2GB as the robot computer, Teensy4.1 as the microcontroller. BTS7960 as motor drivers. RPLIDAR A1 Laser scanner. Ubuntu 20.04. Foxy install using ROS2 so Nav2.

I havent updated any of the stock inputs (besides robot dimensions and motor RPMs) used in the Linorobot2 packages that are supposed to work out of the box.

Launch files are at the GitHub link here, as I said I didnt edit any settings there: https://github.com/linorobot/linorobot2

philmurp gravatar image philmurp  ( 2021-10-14 06:42:43 -0500 )edit

I don't know anythign about the linorobot2 in particular, but sounds like your compute is a bit limited, look over htop and see what the processes are doing. You may need to reduce update rates.

stevemacenski gravatar image stevemacenski  ( 2021-10-14 13:10:04 -0500 )edit

So I reduced my sensor refresh rate from 5 to 2, and most errors were resolved. However the htop is showing a lot of usage memory 978m out of 1.9g, all 4 cores above 50% usage and then it spikes every once in a while. Any other ways I could streamline besides reducing sensor refresh rates?

Also, in my RVIZ opened from host computer, I still see localization is greyed out and inactive, shouldnt that be active? In addition it seems like it doesnt open my maps that I have saved, like it is exploring on its own for the first time, but no error in the call to the map file. Also the movement is very buggy, very often says no path forward and aborts the handle.

philmurp gravatar image philmurp  ( 2021-10-16 08:26:57 -0500 )edit

Hello, One other thought, I am running the following in order: 1) ros2 launch linorobot2_bringup bringup.launch.py 2) ros2 run teleop_twist_keyboard teleop_twist_keyboard 3) ros2 launch linorobot2_navigation slam.launch.py 4) ros2 launch linorobot2_navigation naviation.launch.py

If I run just #1 and #4 (ie dont run SLAM) I get error that I dont get if I do run SLAM: Timed out waiting for transform form base_link to map to become available, tf error: Invalid frame ID "map" passed to can Transform argument target_frame - frame does not exist.

One other option as to not run #2, not sure if that has impacts but didnt solve my issue

philmurp gravatar image philmurp  ( 2021-10-18 15:21:32 -0500 )edit