Skip to content

nodehubs/hobot_nav2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

English| 简体中文

Feature Introduction

Taking the sweeping robot as an example, how to thoroughly clean every place in the house? How to avoid known obstacles such as walls, wardrobes, etc. on the map? It's easy to deal with static obstacles, but what if there are naughty kids or pets, as well as various debris that occasionally appear on the floor, how should the robot avoid them one by one? These issues require a set of intelligent autonomous navigation algorithms to solve.

Autonomous navigation function runs through most of the movement process of mobile robots, and it is also a crucial basic skill in intelligent mobile robots. Robots can plan walking paths effectively based on map information, and they also need to recognize surrounding obstacles in real-time through lidar or cameras. Once unexpected obstacles appear, immediate avoidance actions need to be taken.

Bill of Materials

The following robots are all compatible with RDK X3

Robot Name Manufacturer Reference Link
OriginBot Smart Robot Guyueju Click Here
X3 Sweeping Robot Lunqu Tech Click Here
Tracked Smart Vehicle Weixue Electronics Click Here
RDK X3 Robot Various Manufacturers Click Here

Instructions for Use

Preparation

  1. The robot has a mobile chassis, camera, and RDK kit. The hardware is already connected and tested.
  2. ROS low-level drivers are installed, and the robot can receive "/cmd_vel" commands to move correctly according to the command.
  3. Lidar driver is installed and able to publish /scan topics normally.
  4. PC computer has completed the installation of Ubuntu, ROS Foxy/Humble.

Install the hobot-nav2 package

After starting the robot, connect to the robot via terminal or VNC, click the "One-click Deployment" button on NodeHub hobot-nav2 website, and copy the following command to run on the RDK system to install the hobot-nav2 package.

sudo apt update
sudo apt install -y tros-hobot-nav2

Run nav2

Taking OriginBot as an example here, the commands to execute in the first three steps may vary for robots of different categories.

1. Start the robot's chassis

Start the robot and connect to it via terminal or VNC. The startup command for OriginBot is as follows:

# Set the environment variables for tros
source /opt/tros/setup.bash

# Set the environment variables for ROS
source /opt/ros/foxy/setup.bash
# Launch OriginBot
ros2 launch originbot_base robot.launch.py

2. Start the LiDAR

Connect to the robot via terminal or VNC, and the command to start the LiDAR is as follows:

# Set the environment variables for tros
source /opt/tros/setup.bash

# Set the environment variables for ROS
source /opt/ros/foxy/setup.bash

# Launch the LiDAR
ros2 launch ydlidar_ros2_driver ydlidar_launch.py

3. Launch nav2

After starting the robot, connect to the robot via terminal or VNC, click the "One-click Deployment" button at the top right of this page, copy and run the following command on the RDK system to install Nodes:

# Set the environment variables for tros
source /opt/tros/setup.bash

# Set the environment variables for ROS
source /opt/ros/foxy/setup.bash

# Launch nav2
ros2 launch hobot_nav2 hobot_nav2_bringup.launch.py

4. Visualize Navigation Process

To monitor the robot's navigation process conveniently, start the Rviz visualization software on a PC in the same network:

# Modify the path here according to the ROS version being used
source /opt/ros/foxy/setup.bash

ros2 launch nav2_bringup rviz_launch.py

Once the navigation is launched, the robot initially doesn't know where it is. By default, Nav2 will wait for the user to provide an approximate starting location for the robot. Check the robot's position in Gazebo, find that location on the map, click the "2D Pose Estimate" button in Rviz2, then set the initial position of the robot by clicking at the estimated location on the map. Drag the location clicked forward to set the initial moving direction for the robot.

Note: After starting the navigation, continuous output information will be seen in the terminal because the initial pose of the robot has not been set. Once the initial position is set, the log refreshing will stop.

Click the "2D Goal Pose" button to select the target location, then you can start autonomous navigation on the map.

e69be30fab

Interface Description

For information on interfaces and parameter adjustments, please refer to the official NAV2 documentation NAV2 Parameter Adjustment Guide

References

Frequently Asked Questions

None at the moment

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •