NeuronBot2 is the newest version of NeuronBot make by Adlink, which fully supports ROS1 and ROS2.
- Nice
- Good
- Awesome
- Wonderful
- Magnificent
- Impressive
- Intimidating
- Stunning
- Extraordinary
- Superb
This package includes the functions to bring up the robot, to make it SLAM, to navigation, and to simulate it with your own computer, testing the same functions mentioned before.
Users are able to checkout to different branch of this package to run on ROS1(melodic-version) and ROS2(dashing-version).
# For ROS melodic
git checkout melodic-dev
# For ROS2 Dashing
git checkout dashing-devel
Follow this official installing tutorial. For the sake of convenience, you might want to download ros-dashing-desktop version to make sure all the dependencies are installed.
- Install ROS2
- Create workspace
mkdir -p ~/neuronbot2_ros2_ws/src
- Git clone this package
cd ~/neuronbot2_ros2_ws/ wget https://gist.githubusercontent.com/airuchen/dd5e7962706b32ffaa8d46ba905fea91/raw/d21c4fe2ca0d494202cf84c734c9e8cbca769ff1/NeuronBot2_ros2.repos vcs import src < NeuronBot2_ros2.repos
- Install dependencies
cd ~/neuronbot2_ros2_ws/ rosdep update rosdep install --from-paths src --ignore-src -r -y # Show my respect to this line
- Colcon build the package
cd ~/neuronbot2_ros2_ws/ source /opt/ros/dashing/setup.bash colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release source ~/neuronbot2_ros2_ws/install/local_setup.bash
Now, it's time to launch your NeuronBot2 and do a Robotic-Hello-World thing -- telop it.
Open a new terminal (Ctrl + Alt + t).
source /opt/ros/dashing/setup.bash
source ~/neuronbot2_ros2_ws/install/local_setup.bash
ros2 launch neuronbot2_bringup neuronbot2_bringup.launch.py
source /opt/ros/dashing/setup.bash
ros2 run teleop_twist_keyboard teleop_twist_keyboard
Follow the hints and start to cruise your NeuronBot2.
-
Launch SLAM as well as Rviz.
We provide three slam methods.
- Gmapping
ros2 launch neuronbot2_slam gmapping.launch.py open_rviz:=true
- Slam_toolbox
ros2 launch neuronbot2_slam slam_toolbox.launch.py open_rviz:=true
- Cartographer
ros2 launch neuronbot2_slam cartographer.launch.py open_rviz:=true
-
Teleop NeuronBot2 to explore the world
# Run on the other terminal source /opt/ros/dashing/setup.bash ros2 run teleop_twist_keyboard teleop_twist_keyboard
-
Save the map
source /opt/ros/dashing/setup.bash ros2 run nav2_map_server map_saver -f <map_dir>/<map_name>
The map is ready and SLAM can be turned off.
- Try navigation on your own map.
ros2 launch neuronbot2_nav neuronbot2_nav.launch.py map_dir:=<full_path_to_your_map_name.yaml> open_rviz:=true
-
Set Estimation
Click "2D Pose Estimate", and set estimation to the approximate location of robot on the map.
-
Set Goal
Click "2D Nav Goal", and set goal to any free space on the map.
-
Specify the model path for Gazebo
source /opt/ros/dashing/setup.bash source ~/neuronbot2_ros2_ws/install/local_setup.bash
-
Launch Gazebo simulation.
There are two worlds for users to explore.
- Mememan world
ros2 launch neuronbot2_gazebo neuronbot2_world.launch.py world_model:=mememan_world.model
- Phenix world
ros2 launch neuronbot2_gazebo neuronbot2_world.launch.py world_model:=phenix_world.model
-
Teleop it in the world
Users are able to control the NeuronBot2 with the following rosnode. Run it with the other terminal.
source /opt/ros/dashing/local_setup.bash ros2 run teleop_twist_keyboard teleop_twist_keyboard
p.s. To alleviate CPU consumption, close GAZEBO GUI by clicking x. This will not end the simulation server, which is running backend
-
Launch SLAM as well as Rviz while the Gazebo simulation is running.
We provide three slam methods.
- Gmapping
ros2 launch neuronbot2_slam gmapping.launch.py open_rviz:=true
- Slam_toolbox
ros2 launch neuronbot2_slam slam_toolbox.launch.py open_rviz:=true
- Cartographer
ros2 launch neuronbot2_slam cartographer.launch.py open_rviz:=true
-
Teleop NeuronBot2 to explore the world
# Run on the other terminal source /opt/ros/dashing/setup.bash ros2 run teleop_twist_keyboard teleop_twist_keyboard
-
Save the map
source /opt/ros/dashing/setup.bash ros2 run nav2_map_server map_saver -f <map_dir>/<map_name>
Then, you shall turn off SLAM.
Once users obtain the map, the pgm file & yaml file, navigation is good to go.
- Try navigation on your own map.
ros2 launch neuronbot2_nav neuronbot2_nav.launch.py map_dir:=<full_path_to_your_map_name.yaml> open_rviz:=true
-
Launch Navigation as well as Rviz while the Gazebo simulation is running. Default map is set to mememan.yaml.
- Navigate in mememan map
ros2 launch neuronbot2_nav neuronbot2_nav.launch.py map_dir:=/home/<user_name>/neuronbot2_ros2_ws/src/neuronbot2/neuronbot2_nav/map/mememan.yaml open_rviz:=true
- Navigate in phenix map
ros2 launch neuronbot2_nav neuronbot2_nav.launch.py map_dir:=/home/<user_name>/neuronbot2_ros2_ws/src/neuronbot2/neuronbot2_nav/map/phenix.yaml open_rviz:=true
- Try navigation on your own map. Put the <map_name>.yaml and <map_name>.pgm into " ~/neuronbot2_ros2_ws/src/neuronbot2/neuronbot2_nav/map/ "
ros2 launch neuronbot2_nav neuronbot2_nav.launch.py map_name:=<map_name>.yaml open_rviz:=true
-
Set Estimation
Click "2D Pose Estimate", and set estimation to the approximate location of robot on the map.
-
Set Goal
Click "2D Nav Goal", and set goal to any free space on the map.
To run this demo, users should execute Gazebo server and Navigation (with Rviz for visualization) first.
- Open the other terminal and source the environment variables.
source /opt/ros/dashing/setup.bash source ~/neuronbot2_ros2_ws/install/local_setup.bash
- Run Behavior Tree
ros2 launch neuronbot2_bt neuronbot2_bt.launch.py bt_xml:=neuronbt.xml
- If you see below warning messages after NeuronBot performing navigation, don't worry, it has been fixed at ROS 2 Eloquent.