4
1

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) VLP-16 Nodeの構築

Last updated at Posted at 2021-06-22

CUDA-PCL評価用にVLP-16を動かしたときのメモ。

事前作業

VLP-16 Nodeの構築

Docker内でVLP-16用のNodeをBuildしておきます。

cd ~/data/ros2_ws/src/
git clone -b ros2 https://github.com/ros-drivers/velodyne
cd ~/data/ros2_ws/
colcon build --base-paths src/velodyne
source install/setup.bash

Jetson側の設定

Docker内ではなく、大本のUbuntu上で、ここからは作業します。先に必要なパッケージをインストールしておきます。

sudo apt-get install arp-scan

Jetsonのeth0のIPアドレスを10.0.0.2に固定します。

sudo vi /etc/network/interfaces.d/network
# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0

# DHCP 
#iface eth0 inet dhcp

# Static IP
iface eth0 inet static
address 10.0.0.2
netmask 255.255.255.0
#dns-nameservers 8.8.8.8

ネットワークの再起動をおこないます。

sudo /etc/init.d/networking restart

IPアドレスが割り振られたことの確認

ifconfig -a
...
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.0.0.2  netmask 255.255.255.0  broadcast 10.0.0.255
        inet6 fe80::204:4bff:fecb:e19a  prefixlen 64  scopeid 0x20<link>
        ether 00:04:4b:cb:e1:9a  txqueuelen 1000  (Ethernet)
        RX packets 54497  bytes 61371918 (61.3 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 131  bytes 45724 (45.7 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 41  
...

VLP-16の設定

VLP-16とJetson AGX XavierをダイレクトにEthernetケーブルで接続します。Jetson AGX Xavier側でブラウザを起動し、10.0.0.201に接続します。初期設定では、マルチキャストでデータ送信が行われるため、Jetson AGX XavierのIPアドレスに限定してデータ送信するように変更します。

vlp001.png

項目
Host(Destination) IP Address 10.0.0.2

vlp002.png

VLP-16がネットワーク内に存在していることの確認をおこないます。

sudo arp-scan -l
Interface: eth0, datalink type: EN10MB (Ethernet)
Starting arp-scan 1.9 with 256 hosts (http://www.nta-monitor.com/tools/arp-scan/)
10.0.0.201	60:76:88:10:5e:f9	Velodyne

3 packets received by filter, 0 packets dropped by kernel
Ending arp-scan 1.9: 256 hosts scanned in 3.386 seconds (75.61 hosts/sec). 1 responded

ROS Nodeの起動

再びDockerにログインし、ROS Nodeを起動します。

ros2 run velodyne_driver velodyne_driver_node
ros2 launch velodyne_pointcloud velodyne_convert_node-VLP16-launch.py
rviz2 

rviz2の設定

vlp003.png

vlp004.png

vlp005.png

vlp06.png

4
1
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
4
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?