3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

① CUDA-PCL評価用のROS2(Foxy) Docker構築

Last updated at Posted at 2021-06-16

必要なもの

Jetpack 4.5.1がインストール済みのJetson AGX Xavier。

ROS2用 Docker

まず、ROS2 Dockerをインストールします。

#!/bin/bash

docker run \
    --runtime=nvidia \
    -it \
    -v /tmp/.X11-unix:/tmp/.X11-unix \
    -v /home/jetson/data:/home/jetson/data \
    -e DISPLAY \
    -e QT_GRAPHICSSYSTEM=native \
    -e QT_X11_NO_MITSHM=1 \
    -v /var/run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket:ro \
    -v /etc/localtime:/localtime:ro \
    -v /tmp/argus_socket:/tmp/argus_socket \
    -v /dev/:/dev/ \
    -u jetson \
    --privileged \
    --network=host \
faborobot/ros2-foxy-jetson

次回以降の起動用にScript化

Jetson AGX Xavierのユーザ名がjetsonの場合に、XAuthorityを使わずにセキュアな接続が可能です。以後の作業は、Jetson AGX Xavierのユーザ名がjetsonを前提にします。ユーザ名が、jetsonではない場合、XAuthorityでの認証をオススメします。

run_ros2.sh

#!/bin/bash

docker run \
    --runtime=nvidia \
    -it \
    -v /tmp/.X11-unix:/tmp/.X11-unix \
    -v /home/jetson/data:/home/jetson/data \
    -e DISPLAY \
    -e QT_GRAPHICSSYSTEM=native \
    -e QT_X11_NO_MITSHM=1 \
    -v /var/run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket:ro \
    -v /etc/localtime:/localtime:ro \
    -v /tmp/argus_socket:/tmp/argus_socket \
    -v /dev/:/dev/ \
    -u jetson \
    --privileged \
    --network=host \
faborobot/ros2-foxy-jetson
sudo ./run_ros2.sh

デモ(直接Jetson AGX Xavierにログインしている場合)

rviz2 

デモ(SSHでJetson AGX Xavierにログインしている場合)

export DISPLAY=:0
rviz2 

次の項目

3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?