turtlebot / turtlebot4

Turtlebot4 common packages.
Apache License 2.0
99 stars 45 forks source link

No map received RVIZ2 (Humble) Only RPLIDAR A1 #209

Closed AnOrdinaryUsser closed 1 year ago

AnOrdinaryUsser commented 1 year ago

I am doing a robotics and version testing project with ROS. Since I don't have the camera or the turtlebot 4 kit, I have created something similar to try to use it. I am using only a RPLIDAR A1 without the camera shown in the tutorial, because I don't have it. Below I put a picture of how I have everything mounted in the roomba.

IMG_0867

Using PC OS: Ubuntu 22.04 PC ROS Distro: Humble Raspberry Pi OS: Ubuntu 22.04 Raspberry Pi ROS Distro: Humble Create® 3 firmware version: H.1.2

Expected behaviour Follow the tutorial and generate a map.

Actual behaviour No map is received.

To Reproduce

I get this in RVIZ2: imagen

I have connected my pc, the nuc and the roomba iCreate 3 in the same wifi. I can get from my pc the topics of the nuc connected via USB C to the roomba, like the following picture:

sergio@sergio:~$ ros2 topic list
/battery_state
/clicked_point
/cmd_audio
/cmd_lightring
/cmd_vel
/dock_status
/downsampled_costmap
/downsampled_costmap_updates
/global_costmap/costmap
/global_costmap/costmap_updates
/global_costmap/voxel_marked_cloud
/hazard_detection
/imu
/initialpose
/interface_buttons
/ir_intensity
/ir_opcode
/kidnap_status
/local_costmap/costmap
/local_costmap/costmap_updates
/local_costmap/published_footprint
/local_costmap/voxel_marked_cloud
/local_plan
/map
/map_metadata
/map_updates
/mobile_base/sensors/bumper_pointcloud
/mobility_monitor/transition_event
/mouse
/odom
/parameter_events
/particle_cloud
/plan
/pose
/robot_description
/robot_state/transition_event
/rosout
/scan
/slam_toolbox/feedback
/slam_toolbox/graph_visualization
/slam_toolbox/scan_visualization
/slam_toolbox/update
/slip_status
/static_transform/transition_event
/stop_status
/tf
/tf_static
/waypoints
/wheel_status
/wheel_ticks
/wheel_vels

I am executing this two commands and getting this in terminal: ros2 launch turtlebot4_navigation slam.launch.py sync:=false ros2 launch turtlebot4_viz view_robot.launch.py

sergio@sergio:~$ ros2 launch turtlebot4_navigation slam.launch.py sync:=false
[INFO] [launch]: All log files can be found below /home/sergio/.ros/log/2023-06-27-19-14-54-850864-sergio-2544
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [async_slam_toolbox_node-1]: process started with pid [2545]
[async_slam_toolbox_node-1] [INFO] [1687886095.513091448] [slam_toolbox]: Node using stack size 40000000
[async_slam_toolbox_node-1] [INFO] [1687886095.590721537] [slam_toolbox]: Using solver plugin solver_plugins::CeresSolver
[async_slam_toolbox_node-1] [INFO] [1687886095.591266425] [slam_toolbox]: CeresSolver: Using SCHUR_JACOBI preconditioner.
sergio@sergio:~$ ros2 launch turtlebot4_viz view_robot.launch.py
[INFO] [launch]: All log files can be found below /home/sergio/.ros/log/2023-06-27-19-10-58-454563-sergio-4535
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [rviz2-1]: process started with pid [4536]
[rviz2-1] Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
[rviz2-1] [INFO] [1687885859.019502697] [rviz2]: Stereo is NOT SUPPORTED
[rviz2-1] [INFO] [1687885859.019763450] [rviz2]: OpenGl version: 4.6 (GLSL 4.6)
[rviz2-1] [INFO] [1687885859.046779301] [rviz2]: Stereo is NOT SUPPORTED
[rviz2-1] [WARN] [1687885859.254517492] [rcl.logging_rosout]: Publisher already registered for provided node name. If this is due to multiple nodes with the same name then all logs for that logger name will go out over the existing publisher. As soon as any node with that name is destructed it will unregister the publisher, preventing any further logs for that name from being published on the rosout topic.
hilary-luo commented 1 year ago

You specify that you were wired into the create3 roomba base when you got the list of topics. Were you still wired in when you launched rviz? You do need to be able to see and echo the topics in order for RViz to be able to get the information.

Can you confirm that you have lidar data coming through to the PC? (echo the /scan topic from your PC).

In RViz it is also helpful to expand the sections in yellow / red to see what the errors are. Specifically because the lidar scan data is in question, I would also expand the LaserScan section to see if any points or messages have been received. An example is shown below: image In this image it is telling me that I am not receiving any laser scan data and thus I will not have any map data. Under Global Status Error it is also telling me that no tf data has been received for the robot at all. I produced this by not having a robot connected at all. If you are still having this issue please give the details from this view in rviz.

AnOrdinaryUsser commented 1 year ago

If I do a echo of /scan topic i don't recieve nothing. But I haven't been researching and I don't know if you have to indicate on which USB port the lidar is running, but I couldn't find anywhere to indicate it.

hilary-luo commented 1 year ago

Can you confirm that you still don't see the lidar data if you are ssh'd into the robot?

Assuming this is the case, please ssh in and stop the turtlebot processes sudo systemctl stop turtlebot4.service and then launch the lidar directly and see if you get any error messages ros2 launch rplidar_ros rplidar.launch.py. Attach your output here.

hilary-luo commented 1 year ago

This issue is being closed due to inactivity. If you are still experiencing the issue, feel free to reopen this ticket when you are ready to continue the troubleshooting process.

sdp-team-12 commented 10 months ago

Hello. I am experiencing the same issue, but the only difference is that I am able to see the RPLidar data using rplidar.launch.py. I am running this on a simulator, however, but I have set the simulated robot in an empty world. I can see on RViz that the real lidar data is being read in as well as the simulated world lidar data, but when I try to map using slam toolbox, it does not generate the map I want of the real world, but only the simulated world.

Here is what I am seeing in Gazebo with the empty world: image

Here is what I see on RViz: image

So this is after I launch everything with the robot_localization package and I can see the real data on there, but the map I generate does not take that into account. Don't know what is happening. Please help.

hilary-luo commented 10 months ago

@sdp-team-12 This venue is for issues regarding the Turtlebot4 package. Are you using the Turtlebot4 package because it does not look like it. I would encourage you to enter your issue on the github repo for the packages that you are using and/or on https://robotics.stackexchange.com/.

What I will say though is make sure that slam is looking at the right scan topic and that only 1 robot OR simulated robot is publishing to any given topic (not both)