Robot position jumps during manual and autonomous mapping, which causing abnormal map. Need help
Required Info:
- Operating System:
- ubuntu 20.04
- ROS2 Version:
- Foxy
- Version or commit hash:
- latest binary
- DDS implementation:
- FASTDDS
Steps to reproduce issue
```
robot bringup in robot machine
ros2 launch ros2_diff_drive-robot_bringup bringup.launch.py
robot visualization in Host machine
ros2 launch ros2_diff_drive_robot_visualization robot_model.launch.py
slam toolbox for mapping
ros2 launch ros2_diff_drive_robot_navigation slam.launch.py ```
Expected behavior
While manually controlling the robot it should map the room as clean as possible and should not jump to a different position
Actual behavior
The map is very noisy as seen in the video. The maps rotate as well with the base_frame which I am not sure it supposed to do it or not. After moving the robot it seems it jumps to a different position which is making the map unusable
- video with SLAM toolbox - video link
- Note: Imu topic freezes at some point which has been fixed later using a separate power source for IMU. But this is not causing the main issue.
- video without slam but only lidar laser scan - video link
Additional information
This is a custom differential robot that has teensy 3.2 as a microcontroller running microros client. The robot has also MPU9250 imu and 2 encoders in both motors. For lidar source, I am using YDLIDAR. As seen in the videos the map shifts while manually moving the robot, which is why I cannot get a clean map. The weird jumps or map shift does not appear in the simulation with the same robot description file. Any help is appreciated.
All the config files and launchers are below:
ekf config file
ekf_filter_node: ros__parameters: frequency: 50.0 two_d_mode: true publish_tf: true map_frame: map odom_frame: odom base_link_frame: base_footprint world_frame: odom transform_time_offset: 0.1 transform_timeout: 0.1 #x , y , z, #roll , pitch , yaw, #vx , vy , vz, #vroll , vpitch, vyaw, #ax , ay , az odom0: odom/unfiltered odom0_config: [false, false, false, false, false, false, true, true, false, false, false, true, false, false, false] imu0: imu/data imu0_config: [false, false, false, false, false, false, false, false, false, false, false, true, false, false, false]
YDLIDAR config
ydlidar_ros2_driver_node: ros__parameters: port: /dev/ydlidar frame_id: laser ignore_array: "" baudrate: 128000 lidar_type: 1 device_type: 6 sample_rate: 5 abnormal_check_count: 4 resolution_fixed: true reversion: true inverted: true auto_reconnect: true isSingleChannel: false intensity: false support_motor_dtr: true angle_max: 180.0 angle_min: -180.0 range_max: 10.0 range_min: 0.12 frequency: 5.0 invalid_range_is_inf: false transform_time_offset: 0.1 transform_timeout: 0.1
bringup.launch.py
import os import yaml from ament_index_python.packages import get_package_share_directory from launch import LaunchDescription from launch.actions import DeclareLaunchArgument, IncludeLaunchDescription from launch.substitutions import LaunchConfiguration, PathJoinSubstitution, PythonExpression from launch.launch_description_sources import PythonLaunchDescriptionSource from launch_ros.actions import Node from launch_ros.substitutions import FindPackageShare from launch.conditions import IfCondition def generate_launch_description(): sensors_launch_path = PathJoinSubstitution( [FindPackageShare('ros2_diff_drive_robot_bringup'), 'launch', 'sensors.launch.py'] ) joy_launch_path = PathJoinSubstitution( [FindPackageShare('ros2_diff_drive_robot_bringup'), 'launch', 'joy_teleop.launch.py'] ) description_launch_path = PathJoinSubstitution( [FindPackageShare('ros2_diff_drive_robot_description'), 'launch', 'description.launch.py'] ) #ekf_config_path = PathJoinSubstitution( # [FindPackageShare('ros2_diff_drive_robot_bringup'), 'config', 'ekf.yaml'] #) ekf_config_path = os.path.join(get_package_share_directory('ros2_diff_drive_robot_bringup'), 'config/ekf.yaml') # Load the parameters specific to your ComposableNode with open(ekf_config_path, 'r ...
hi, did you resolved this? I'm having the same problem even without performing SLAM.
So far no and I had to put a pause on that for while. I still do not know where I am making the mistake.