I am working on integrating Nav2, specifically SLAM and navigation functionalities, with my B2-W robot in Gazebo. I have successfully incorporated a lidar sensor into the simulation model.
However, I’m encountering a challenge because the current simulation setup does not use a standard cmd_vel topic, as is present on the real robot. Instead, the simulation publishes velocity commands on a velocity_controller/command topic, which has a different message type/interface than what Nav2 expects.
Additionally, I observed that the real robot uses a topic named b2_unit_xxx/cmd_vel/hardware. Is there a way to integrate this specific topic’s functionality into the simulation model? Since the Nav2 toolbox requires cmd_vel data, could you please assist me in adjusting the simulation model? My goal is to use it to map the simulated environment and then utilize the navigation toolbox for robot movement.
Furthermore, while integrating the GPU lidar, I noticed an issue where several rays do not collide with objects. Are you aware of this problem?
If you add a ros2 diff drive controller, it will automatically claim the velocity controller and can be used with the velocity controller. Alternatively you can creat a script the subscribes to cmd_vel topic and the publish to the velocity controller.
You just need to add namespaces and remapping to each of the nodes with the correct b2_unit_xxxx value and it should then work with the nav2 as well.
Hmm, first time I’m hearing of it, could you check the collision boxes in rviz to make sure the issue is not from the urdf itself?