turtlebot / turtlebot4

Turtlebot4 common packages.
Apache License 2.0
105 stars 47 forks source link

Rviz not generating a map, but Turtlebot 4 is visable #200

Closed TRVLabs-Axel closed 1 year ago

TRVLabs-Axel commented 1 year ago

Please provide the following information:

Screenshot from 2023-06-19 11-08-32

These are the errors that are being presented in Rviz:

Screenshot from 2023-06-19 11-09-34

Screenshot from 2023-06-19 11-09-50

To Reproduce Provide the steps to reproduce:

  1. run ros2 launch turtlebot4_navigation slam.launch.py
  2. run ros2 launch turtlebot4_viz view_robot.launch.py
  3. see the error

Other notes The terminal that I run Rviz in generates this warning, but I do not know if it is relevant: Warning: Invalid frame ID "" passed to canTransform argument source_frame - in tf2 frame_ids cannot be empty

And the terminal which runs SLAM prints this: LaserRangeScan contains 1014 range readings, expected 1006

I have tried to run asynchronous SLAM, but that does not change anything. I have also tried to change the Fixed Frame, in Global Options, to odom (which does not change anything) and rplidar_link which removes the error with the LaserScan, but does not generate a map.

Here is the output from ros2 topic list: /battery_state /cmd_audio /cmd_lightring /cmd_vel /color/preview/camera_info /color/preview/image /diagnostics /diagnostics_agg /diagnostics_toplevel_state /dock /dock_status /hazard_detection /hmi/buttons /hmi/display /hmi/display/message /hmi/led /imu /interface_buttons /ip /ir_intensity /ir_opcode /joint_states /joy /joy/set_feedback /kidnap_status /mobility_monitor/transition_event /mouse /odom /parameter_events /robot_description /robot_state/transition_event /rosout /scan /slip_status /static_transform/transition_event /stereo/camera_info /stereo/depth /stop_status /tf /tf_static /wheel_status /wheel_ticks /wheel_vels

And here is from ros2 node list: /_internal/composite_hazard /_internal/kinematics_engine /_internal/mobility /_internal/stasis /analyzers /joy_linux_node /mobility_monitor /motion_control /rgb_stereo_node /robot_state /robot_state_publisher /rplidar_composition /static_transform /system_health /teleop_twist_joy_node /turtlebot4_base_node /turtlebot4_diagnostics /turtlebot4_node /ui_mgr

VicenteMoraes commented 1 year ago

Hi,

I'm having the exact same issue and haven't been able to run SLAM in neither the real nor simulated robot. Just wondering if there's something I'm doing wrong as well.

hilary-luo commented 1 year ago

Can you please confirm that all parts of your system are running ROS 2 Humble? The raspberry pi, create3 and the user pc all need to be running ROS 2 Humble. This means that your user PC should be running Ubuntu Linux - Jammy Jellyfish (22.04).

TRVLabs-Axel commented 1 year ago

I have now flushed the Turtlebot 4 so that it is a clean install with humble. All parts of the system are now running ROS 2 Humble, but the issue is still the same. My Ubuntu version is 22.04 and not 20.04 as I stated above so sorry for that mistake. Do you have any other tips that I could try?

TRVLabs-Axel commented 1 year ago

Luckily we had access to a Turtlebot 4 lite, so we took the RPLIDAR from the lite version and put it on the standard version. This solved our problem and we can now generate a map. I do not know if we could have solved it another way, but maybe it can be of help to others that the RPLIDAR seems to be the problem in this case.

hilary-luo commented 1 year ago

Does the other lidar work on the other robot? If the RPLIDAR that you received from Clearpath Robotics was faulty out of the box feel free to reach out to support@clearpathrobotics.com to have this addressed.