Table of contents
Table of Contents |
---|
Installing ROS1
For ros melodic follow the instructions from this page: http://wiki.ros.org/melodic/Installation/Ubuntu
For ros kinetic follow the instructions from this page: http://wiki.ros.org/kinetic/Installation/Ubuntu
For ros melodic on Raspberry pi 4 follow the instructions from this page: Standalone AR Demo ROS Setup
Installing the prebuilt ar_monitor package
Download the package:
You can download our package binary package from Bitbucket repo:
For ros melodic: ros-melodic-ar-monitor.deb
For ros kinetic: ros-kinetic-ar-monitor.deb
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:
Launch the status_server node
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
Ros eloquent follow the instructions from this page:https://index.ros.org/doc/ros2/Installation/Eloquent/Linux-Install-Debians/
...
Code Block |
---|
source /opt/ros/eloquent/setup.bash |
Download the ar_monitor prebuilt package:
You can download our binary package from Bitbucket repo:
For ros eloquent: ros-eloquent-ar-monitor.deb
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:
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 | ||
---|---|---|
| ||
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.
...