Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of contents

Table of Contents

Installing ROS1

Installing the prebuilt ar_monitor package

Download the package:

You can download our package binary package from Bitbucket repo:

Installing the package

Open the Downloads folder in a new terminal:

...

Code Block
source /opt/ros/[version]/setup.bash 

Run or Launching the ros node:

Launching the status_server node:

Open a new terminal:

Code Block
roslaunch ar_monitor all.launch   #you have to install rosbridge_server the rosapi packages

Running the status_server node:

Open a new terminal:

Code Block
roscore

...

Code Block
rosrun ar_monitor status_server.py

Testing on local packages

Open a new terminal:

  1. Launch the status_server node

  2. Calling the service of the node (in a new tab):

...

Code Block
rosservice call /ar_status_service "arg: 'ar_monitor/all.launch'"

Running ROS1 kinetic in Docker

Installing Docker:

Code Block
sudo apt-get install docker.io

Pull the docker image:

Code Block
docker pull ngisystems/ros-kinetic-ar-monitor

Running the docker container:

Code Block
sudo docker run -it ngisystems/ros-kinetic-ar-monitor

Running the image in multiple terminal:

Code Block
sudo docker exec -it <container_name> bash #for example sudo docker exec -it d3363b5c0bc4 bash

** In this docker image is included the ardrone_autonomy package for testing.

Example of running the nodes in docker

Open a new terminal:

Code Block
sudo docker run -it  ngisystems/ros-kinetic-ar-monitor
source /opt/ros/kinetic/setup.bash
roslaunch ar_monitor all.launch

...

Code Block
sudo docker exec -it  [container] bash
source /opt/ros/kinetic/setup.bash
roslaunch ardrone_autonomy ardrone.launch

Using rosbag for simulating a drone:

Open a new terminal:

Code Block
sudo docker run -it --network host  ngisystems/ros-kinetic-ar-monitor
roscore

...

Code Block
sudo docker exec -it [container] bash
rostopic echo /ardrone/navdata

ROS2 Setup

Installing ROS2

...

Code Block
source /opt/ros/eloquent/setup.bash 

Download the ar_monitor prebuilt package:

You can download our binary package from Bitbucket repo:

Installing the ar_monitor package

Installing the .deb file

Open the Downloads folder in a new terminal install first the dependency for the package and the package itself:

Code Block
sudo apt-get install ros-eloquent-launch-testing
sudo dpkg -i ros-eloquent-ar-monitor.deb

Run or Launching the ros node:

Launching the status_server node:

Open a new terminal:

Code Block
ros2 launch ar_monitor ar_monitor.launch.py

Running the status_server node:

Open a new terminal:

Code Block
ros2 run ar_monitor status_server.py

Testing on local packages

Open a new terminal:

  1. Run the status_server node

...

Code Block
rosservice call /ar_status_service "arg: 'ar_monitor/all.launch'"

Using the ROS2 ar_monitor Package with ROS1 and Android

Create a new ros2 workspace in a terminal:

Code Block
mkdir eloquent_ws
cd eloquent_ws
mkdir src
colcon build

Cloning the ROS2AR repo and extract the ros part

Code Block
cd src
git clone -b ROS2AR-28-ROS2-Adapter --single-branch https://bitbucket.org/NGi-Systems/ros2ar.git
cd ros2ar
cp -r ros/ar_monitor/ ..
cd .. && mv ros2ar/ ~/

Clone the ros1_bridge to the created ros2 workspace:

Code Block
cd ~/eloquent_ws/src
git clone https://github.com/ros2/ros1_bridge.git
cd ..
sudo apt-get install ros-eloquent-launch-testing-ament-cmake

Build the packages:

Code Block
source /opt/ros/melodic/setup.bash
source /opt/ros/eloquent/setup.bash
colcon build --packages-select ar_monitor
source install/setup.bash
colcon build --symlink-install --packages-select ros1_bridge --cmake-force-configure

Running the all necessary nodes for ROS2AR project with ROS2 adaptor:

Open a new terminal and launch the rosbridge websocket for ROS1

...

In this way you can access the ar_monitor package both from ROS1 in ROS2 and vice-versa.

Running ROS1-ROS2 Docker and the ar_monitor snap package

Installing Docker:

Code Block
sudo apt-get install docker.io

Pull the docker image:

Code Block
docker pull ngisystems/ros-melodic-eloquent-ar-monitor

Running the docker container:

Code Block
sudo docker run -it --network host ngisystems/ros-melodic-eloquent-ar-monitor

Running the image in multiple terminal:

Code Block
sudo docker exec -it <container_name> bash #for example sudo docker exec -it d3363b5c0bc4 bash

Example of running the nodes in docker

Open a new terminal:

Code Block
sudo docker run -it --network host ngisystems/ros-melodic-eloquent-ar-monitor
source /opt/ros/melodic/setup.bash
source /opt/ros/eloquent/setup.bash
cd eloquent_ws
source install/setup.bash
ros2 run ar_monitor status_server.py

...

Code Block
sudo docker exec -it  [container] bash
source /opt/ros/melodic/setup.bash
source /opt/ros/eloquent/setup.bash
cd eloquent_ws
source install/setup.bash
ros2 run ros1_bridge dynamic_bridge

Installing and running ar_monitor package with snap

Installing the snap command:

Code Block
sudo apt update
sudo apt install snapd

Downloading and installing the snap file:

Download the snap file from Bitbucket: ros2-ar-monitor.snap

Code Block
cd Downloads
sudo snap install ros2-ar-monitor.snap --devmode

Running the snap file

Code Block
ros2-ar-monitor

...

Code Block
languagebash
export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libgtk3-nocsd.so.0

Acknowledgements

...

Supported by ROSIN - ROS-Industrial Quality-Assured Robot Software Components.
More information: ROSIN.

...