Skip to content

anpl-technion/anpl_mrbsp

Repository files navigation

Welcome to ANPL's Multi Robot Belief Space Planning with ROS (anpl_mrbsp) wiki

mrbsp_screenshot.png

Useful wiki pages:

Overview

anpl_mrbsp repository is a set of ros packages design to support experiments in ANPL. This software package provide active or passive SLAM solution in both simulation and real environment. This software package is designed with modular to support minimum effort when integrating new components.

The code is constructed with 9 main blocks (nodes):

  1. Odometry
  2. Data association (DA)
  3. Belief
  4. Map
  5. State machine
  6. Action generator
  7. Planner
  8. Controller
  9. Collision detector

A passive scenario will be constructed from nodes 1-4. Active scenario will include also nodes 5-9.

In addition, the software package contains a set of utility code:

  1. Generated scenarios
  2. Ros msgs package
  3. Utility functions
  4. Code for general configuration of a scenario
  5. Offline code (with rosbags)

Keywords: SLAM, BSP, multi-robot

License

Autonomous Navigation and Perception Lab (ANPL), Technion, Israel Institute of Technology, Faculty of Aerospace Engineering, Haifa, Israel, 32000 All Rights Reserved

See LICENSE for the license information

The anpl_mrbsp packages have been tested under ROS Melodic and Ubuntu 18.04. This is research code, expect that it changes often and any fitness for a particular purpose is disclaimed.

Installation (from sources)

For easy installation, check installation scripts repository: mrbsp_installation_scripts

Dependencies



Create Workspace

The code is build within a catkin workspace. Please note that ros tutorials suggest to use catkin_make to build the packages in the workspace. We on the other hand use the command catkin build.

note: If a catkin workspace is already created on your system, you can skip this part and build mrbsp ros packages in your workspace.

#!bash

PROJECT_NAME=anpl_mrbsp
WS_NAME=mrbsp_ws
WS_PATH=~/ANPL/infrastructure/$WS_NAME
PREFIX=/usr/ANPLprefix
#remove old anpl_mrbsp workspace
sudo rm -rf $WS_PATH

mkdir -p $WS_PATH/src && cd $WS_PATH
catkin init
catkin build

source $WS_PATH/devel/setup.bash
echo "source $WS_PATH/devel/setup.bash" >> ~/.bashrc  


Building

To build from source, clone the latest version from this repository into your catkin workspace, run several scripts (located in mrbsp_ros_utils package), and compile the package using

#!bash

PROJECT_NAME=anpl_mrbsp
WS_NAME=mrbsp_ws
WS_PATH=~/ANPL/infrastructure/$WS_NAME
PREFIX=/usr/ANPLprefix

cd $WS_PATH/src
git clone https://bitbucket.org/ANPL/pioneer_keyop
git clone https://bitbucket.org/ANPL/anpl_ros_infrastructur anpl_inf
git clone https://bitbucket.org/ANPL/anpl_mrbsp
git clone https://github.com/MobileRobots/amr-ros-config

#copy cmake files that node will find anpl libs.
cd $WS_PATH/src/anpl_mrbsp/mrbsp_utils/scripts/
sudo sh install-find-cmakes.sh

./install-rosaria.sh
./install-rotors-simulation.sh

cd $WS_PATH
catkin build

For both create workspace and build from scratch use the following scrip. Attention: the script delete the old workspace. so back up and take everything you need before run the script.

#!bash

install-mrbsp_ros-ws.sh  (NOT TESTSED YET)



Usage

Running real experiment with Pioneer robots:

In order to use anpl_mrbsp a scenario needs to be defined. This scenario should include launch files (XML files) for each participating robot and for a centralized machine (if needed).

Example (anpl_active_demo scenario):

@ Central computer
if the central computer is in the same computer skip 2-4th step:

  1. Connect to ANPL_LINKSYS or ANPL_monster network(depends to what router the centralized computer is connected).
  2. In new terminal, open roscore:
roscore
  1. In new teminal, run master discovery:
rosrun master_discovery_fkie master_discovery
  1. In new teminal, run master sync:
rosrun master_sync_fkie master_sync
  • To skip 2-4 steps launch
roscd anpl_active_demo/scripts
./roscore_master_discovery_synch.sh
  1. In new terminal(tab), before launching the centralized launch file, decide on number of robots. For this Example let us choose 2.
NUM_ROB=2
only_change_num_of_robots.sh $NUM_ROB
Rob_str="A:=true B:=true  C:=false D:=false"
roslaunch anpl_active_demo centralized_laser_active_demo_pioneer.launch $Rob_str

@ Robot A
if the central computer is in the same computer skip 2-4 th steps:

  1. Connect to ANPL_LINKSYS or ANPL_monster network(depends to what router the centralized computer is connected).
  2. In new terminal, open roscore:
roscore
  1. In new teminal, run master discovery:
rosrun master_discovery_fkie master_discovery
  1. In new teminal, run master sync:
rosrun master_sync_fkie master_sync
  • To skip 2-4 steps launch
roscd anpl_active_demo/scripts
./roscore_master_discovery_synch.sh
  1. Turn the robot on and connect the lidar to the battery:
  2. On new terminal go to the scenario folder and connect to the sensor onboard the robot:
roscd anpl_active_demo/scripts
./run_robot_sensors_A.sh
  1. Launch the odometry node:
roslaunch anpl_active_demo robot_setup_pioneer_A.launch
  • To skip 6-7 steps launch
roscd anpl_active_demo/scripts
./robot_setup_pioneer.sh A 5

note:

Run on each robot with its own ID: A, B, ...
Second argument is the time delay between running different dependent group of nodes.
Controller must wait until its inputs are ready, otherwise Gazebo teleport the robot to origin.
Launch file does not guarantee the order of execution of nodes.

@ Robot B
repeat step 1-5th like robot A. - not running centralize on the same computer.
repeat step 6-7th change A to B respectively.

For more scenarios, see scenarios description.

Running Gazebo simulation:

  1. Open Gazebo world: (for 2 robots)
NUM_ROB=2
only_change_num_of_robots.sh $NUM_ROB
INPUT_STR="A:=true B:=true  C:=false D:=false"
roslaunch anpl_active_demo pioneer3at_world.launch $INPUT_STR
  1. Run in central computer the centralized nodes:
roslaunch anpl_active_demo centralized_laser_active_demo_gazebo.launch $INPUT_STR
  1. Robot A:
roscd anpl_active_demo/scripts
./robot_setup_gazebo.sh A 5
  1. Robot B:
roscd anpl_active_demo/scripts
./robot_setup_gazebo.sh B 5
  • To skip 1-4 steps launch
roscd anpl_active_demo/scripts
./lazy_gazebo_MR_full.sh 2


About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published