Visualizing MARA modular robot with rviz2

Gazebo simulation RVIZ2

For visualizing MARA, we make use of rviz2 (ROS2 visualization), a 3D visualizer for displaying sensor data and state information from ROS2. Using rviz2, you can visualize MARA's current configuration (both on the real robot or of a simulated instance) on a virtual model of the robot.

Installation instructions for visualization and simulation are pretty much the same.

You can install ROS 2.0 in today's main platforms: Windows, Linux and OSX. Refer to https://index.ros.org/doc/ros2/Installation/ for the official documentation on how to install ROS2.

Our recommendation is to create a dedicated workspace for MARA modular robot however as always, if you know what you're doing, feel free to fetch these packages into your usual workspace.

Create a dedicated ROS2 workspace for MARA as follows:

mkdir -p ~/ros2_mara_ws/src
cd ~/ros2_mara_ws
sudo apt install -y python3-vcstool python3-numpy
wget https://raw.githubusercontent.com/acutronicrobotics/MARA/master/mara-ros2.repos
vcs import src < mara-ros2.repos

As a modular robot, MARA uses a common interface to ensure interoperability across modules. Such interface is defined by the Hardware Robot Information Model (HRIM). First thing we should do is to generate the HRIM dependencies:

pip3 install hrim
cd ~/ros2_mara_ws/src/HRIM
hrim generate models/actuator/servo/servo.xml
hrim generate models/actuator/gripper/gripper.xml

Read more about HRIM below our Technology section.

source /opt/ros/kinetic/setup.bash

Right now you can compile the code:

source /opt/ros/crystal/setup.bash
cd ~/ros2_mara_ws && colcon build --merge-install

Addressed by:

export LIBRARY_PATH="/usr/local/Cellar/bullet/2.88/lib/:$LIBRARY_PATH"
export LIBRARY_PATH="/usr/local/Cellar/gazebo9/9.7.0/lib/:$LIBRARY_PATH"

rviz2 -d `ros2 pkg prefix mara_gazebo`/share/mara_gazebo/rviz/mara.rviz