This repository contains the Gazebo-ROS simulation of MRR robot being developed at Xavor Coorporation. The aim of this simualtion is to replicate the actual robot in nearly every means to test navigation and other different enviorment scenerios. Gazebo is used as the simulator due to its verstile use in robotics and its integration ease with ROS.
-
ROS Melodic
Follow the instructions here for complete ROS-Melodic installation.
-
Gazebo 9.0
This simulation has been created on Gazebo (9.19.0) version. Use the same version for avoiding any confilicts with packages and model file. Installation instructions can be followed here.
-
Gazebo-ROS-Packages
On top of Gazebo, the Gazebo-ROS-Packages are essentially needed for this simulation. The serve as a brigde between ROS and Gazebo. Installtion and working instructions can be followed here.
-
RTAB-MAP
The mapping/ navigation has been implementated using RTAB-MAP. See the instruction to properly install the package before setting up the simulation.
-
Move-Base Package
The navigation of robot has been done using the
move_base
package. See the instructions for complete guide. Run the following command for installation.sudo apt-get install ros-melodic-move-base*
-
Clone the complete project into your workspace
src
folder:git clone https://github.com/Xavorcorp/Embd_MRR-Simulation.git
-
Compile everything using:
catkin_make
This project spawns the Rehab Robot in various scenerios. The basic standalone simulation of robot along with the different worlds are discussed below.
Run the following launch file to spawn the Rehab Robot in Gazebo environment.
roslaunch rehab_robot rehab_robot_bare.launch
Make sure no errors are there no errors appearing on the terminal other than the ones shown below. These errors have no linkages with simulation. They will be removed in next update to the package.
After this step, you should see the robot spawned in Gazebo like the one shown below.
You can list the rostopics using rostopic list
in terminal to see all robot related topics. Use RVIZ to see the data coming on various topics including laser scanner, Camera, sensors & other sensors. If this step succeeds without any errors, the robot spawing is being done properly and the sensors are correctly working.
There are various world files available to spawn and test the robot for various navigation scenerios. The main world file is the living lab enviornmet. Run the following:
roslaunch rehab_robot spawn_in_living_lab.launch
You should see the following output on Gazebo.
Similarly, other worlds can be run by the following commands (outputs shown below):
roslaunch rehab_robot spawn_in_square_room.launch
roslaunch rehab_robot spawn_in_maze.launch
The robot can be moved around using the teleop node. Run the following node to move around the robot in different environments.
rosrun teleop_twist_keyboard teleop_twist_keyboard.py
Gmapping, a 2D-laser based SLAM has been implemented and tested in simulation with the same parameters as used in actual robot. To run the navigation, follow the steps below.
-
Make sure that the robot is spawned in the living lab Gazebo model.
-
A 2D map has already been created and stored in the
rehab_navigation/maps
folder. -
Launch the following launch file to run the navigation. RVIZ screen will appear with the 2D map as shown below.
roslaunch rehab_navigation rehab_navigation.launch
-
Initially the robot might not be localized correclty. Use the 2D-Pose estimate tool from RVIZ toolbar and mark the correct location of robot on map.
-
Provide the goal to robot from RVIZ toolbar.
The basic mappinga and navigation has been implemented on the robot using the RTAB-MAP. Detailed information on setting up mapping and navigation using RTAB-Map can be seen here
Launch any of the above described world file to start the mapping. After that launch the mapping using:
roslaunch rehab_robot rtab_mapping.launch
Move the robot in the environment using teleop node to create the map of the area.
Once mapping has been done, the next step is navigate the robot autonomously. Run the navigation file using:
roslaunch rehab_robot rtab_navigation.launch
Then, run the move_base
launch file for moving the robot inside the area. Details on move_base
can be found here.
roslaunch rehab_robot rtab_move_base.launch
After successsfully launching both files, you should see the following result.
Provide the goal from RVIZ
goal menu. The robot will be able to navigate inside the map area.
This work was done in order to animate an actor inside the above developed simulation. The aim was to somehow model the elderly person inside the living lab area and then test the navigation algorithms and the mobility index calculation algorithms being developed by the AI team. This work is still under progress and has not been used anywhere to test due to extensive work required in simulating the animation of person in various styles.
Launch the below mentioned file to see the actor spawing inside Gazebo. Further complete details on spawing an actor and modeling etc can be found here.
roslaunch rehab_robot spawn_actor.launch
The aim is to find the location of robot and person inside the map while navigating and also to calcuate the duration the person spends at various areas inside the map. This work has been implemented here and tested on actual robot. It will be availble to test in simulation soon.
Author: Ali Ahmad
Designation: Senior Robotics Engineer
Email: [email protected]