Skip to content

Adlink-ROS/BT_ros1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BT_ros1

Behavior Tree example for ROS1

Support ROS version

  • melodic
  • noetic

Build up environment

  1. git clone the repo.
mkdir -p ~/ros1_bt_ws/src
cd ~/ros1_bt_ws/src
git clone https://github.com/Adlink-ROS/BT_ros1.git
  1. Install dependencies
cd ~/ros1_bt_ws
rosdep install --from-paths src --ignore-src -r -y
  1. Build
catkin_make
# If you want to build with OpenVINO support
catkin_make --cmake-args -DBUILD_OPENVINO=ON

Usage

We use NeuronBot2 as example. We will run Gazebo with NeuronBot2 and show a simple BT example.

The BT example (refer to bt_nav_mememan_interrupt.xml) will make NeuronBot2 move between Goal_a and Goal_b. If receiving /interrupt_event, which is gohome, then NeuronBot2 will move to Goal_c.

  • Open 1st terminal and run mememan world. (melodic environment)
source ~/neuronbot2_ros1_ws/devel/setup.bash
export GAZEBO_MODEL_PATH=~/neuronbot2_ros1_ws/src/neuronbot2/neuronbot2_gazebo/models
roslaunch neuronbot2_gazebo neuronbot2_world.launch world_model:=mememan_world.model
  • Open 2nd terminal and run navigation. (melodic environment)
source ~/neuronbot2_ros1_ws/devel/setup.bash
roslaunch neuronbot2_nav bringup.launch map_name:=$HOME/neuronbot2_ros1_ws/src/neuronbot2/neuronbot2_nav/maps/mememan.yaml open_rviz:=true
  • Open 3rd termainal and run BT. (melodic environment)
source ~/ros1_bt_ws/devel/setup.bash
rosrun bt_sample node _file:=$HOME/ros1_bt_ws/src/BT_ros1/bt_xml/bt_nav_mememan_interrupt.xml
  • Open 4th terminal and pub interrupt event. (melodic environment)
rostopic pub /interrupt_event std_msgs/String "gohome"

About

Behavior Tree example for ROS1

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published