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

Help me with the wheel and base_link connection issue when running the slam toolbox package. #28

Open
HaiHai-17 opened this issue Nov 10, 2024 · 16 comments

Comments

@HaiHai-17
Copy link

My Mecanum robot model, with hardware including a Raspberry Pi 4, ESP32, YDLidar, MPU6050, and OV5647 camera. Everything is working fine, including the laser, MPU, and encoder. However, when I start creating a map using the slam_toolbox package, I encounter the problem as shown in the image. Specifically, the wheels lose connection with the base link.
384666512-7271538f-e263-4add-8bc2-a8a7224d4bef.png

PXL_20241007_171722836.jpg

@hippo5329
Copy link
Owner

Please launch bringup only. Check /scan and /imu/data hz in another terminal.

@hippo5329
Copy link
Owner

bash install_linorobot2.bash mecanum ydlidar

Make sure you use by-path device names.

@HaiHai-17
Copy link
Author

The problem still hasn't been resolved, and I'm facing the same issue when running Gazebo :(

@hippo5329
Copy link
Owner

As you have the robot. Ignore Gazebo for now.

Check /scan and /imu/data hz.

@hippo5329
Copy link
Owner

Down/stop everything.

Follow this wiki to bringup the robot. Do not launch other staff.

https://github.com/hippo5329/linorobot2_hardware/wiki#esp32-with-serial-transport-and-lidar-on-the-robot-computer

Check the topics, echo, and find the hz rate.

https://github.com/hippo5329/linorobot2_hardware/wiki#check-topics

@hippo5329
Copy link
Owner

Which ROS2 distro do you use? Are you running VM?

@hippo5329
Copy link
Owner

Do you see four wheel links in joint state topic?

@hippo5329
Copy link
Owner

Post the log message of bringup launch.

@hippo5329
Copy link
Owner

You should have give more details in your configuration. Are you running ROS2 VM on Windows laptop?

You can not run VM on Windows to connect to ROS2 on rpi on robot. The RMW won't work without some discovery help such as discovery server. You can verify this issue by simple publisher/listener test to/from both sides.

You should use VNC server or remote desktop on rpi. Run all the ROS2 tasks on rpi.

@HaiHai-17
Copy link
Author

I'm currently using VMWare on Windows 11, Ubuntu 22.04, ROS2 Humble, and Gazebo for simulation. I'm using the git linorobot2 and when I launch Gazebo, the robot model displays normally. However, when I launch the slam_toolbox package to build a map, the wheels in RViz2 display an error as shown in the image, preventing the robot from moving around and building a map. The same error occurs when running on a real robot with a Raspberry Pi 4, Ubuntu 22.04, and ROS2 Humble.
image
image

@HaiHai-17
Copy link
Author

view tf2
image

@hippo5329
Copy link
Owner

Please check joint state msg as I asked.

"Do you see four wheel links in joint state topic?"

@HaiHai-17
Copy link
Author

When I run the command 'ros2 topic echo /joint_states', nothing is displayed.
image

@hippo5329
Copy link
Owner

I think you hacked too much. You should revert to my original code. The topic should be

ubuntu@cc187:~$ ros2 node list
/ekf_filter_node
/joint_state_publisher
/ld19
/pico
/robot_state_publisher
/transform_listener_impl_610ff0739b50

ubuntu@cc187:~$ ros2 topic list -t
/battery [sensor_msgs/msg/BatteryState]
/cmd_vel [geometry_msgs/msg/Twist]
/diagnostics [diagnostic_msgs/msg/DiagnosticArray]
/imu/data [sensor_msgs/msg/Imu]
/joint_states [sensor_msgs/msg/JointState]
/odom [nav_msgs/msg/Odometry]
/odom/unfiltered [nav_msgs/msg/Odometry]
/parameter_events [rcl_interfaces/msg/ParameterEvent]
/robot_description [std_msgs/msg/String]
/rosout [rcl_interfaces/msg/Log]
/scan [sensor_msgs/msg/LaserScan]
/set_pose [geometry_msgs/msg/PoseWithCovarianceStamped]
/tf [tf2_msgs/msg/TFMessage]
/tf_static [tf2_msgs/msg/TFMessage]

@HaiHai-17
Copy link
Author

Okay, I'll try it again from the beginning with your rolling version.

@hippo5329
Copy link
Owner

It is important to check all the topics,

https://github.com/hippo5329/linorobot2_hardware/wiki#check-topics-1

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

2 participants