3
4

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.

Raspberry PiにUbuntu20.04とROS Noeticをインストール

Posted at

SDカードにUbuntu20.04のイメージを焼く

公式のImagerで。
20.04はServerしかなかった。
Screen Shot 2021-01-11 at 17.52.53.png

Wifi設定

SDカードの段階で設定しておく。

wifis:
  wlan0:
    dhcp4: true
    optional: true
    access-points:
        "ssid":
            password: 12345678

ラズパイにログイン

arp-scanでラズパイのIPを見つけて、ubuntuユーザでログインする。

% arp-scan -l
192.168.0.16	 Raspberry Pi Trading Ltd

% ssh ubuntu@192.168.0.16

ROSインストール

公式ページに従ってインストールする。
http://wiki.ros.org/action/info/noetic/Installation/Ubuntu

$ sudo apt install ros-noetic-desktop-full

必要なパッケージのインストール

rosdepパッケージが見つからない。

E: Package 'python-rosdep' has no installation candidate

rosdepはnoeticだと下記になるとのこと。
http://wiki.ros.org/rosdep

$ sudo apt-get install python3-rosdep
$ sudo rosdep init
$ rosdep update
$ sudo apt install python3-rosinstall
$ sudo apt install python3-osrf-pycommon python3-catkin-tools

ROS環境設定

毎回実行する必要がある。もしくは.bashrcに入れる。

$ source /opt/ros/noetic/setup.bash

catkinワークスペースを作る

$ mkdir -p ~/catkin_ws/src
$ cd ~/catkin_ws
$ catkin init
$ catkin build
$ source devel/setup.bash
$ echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc

ROS起動

ubuntu@ubuntu:~/catkin_ws$ roscore
... logging to /home/ubuntu/.ros/log/504fac3a-5870-11eb-becd-1bb2a86cd69c/roslaunch-ubuntu-6427.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://ubuntu:40475/
ros_comm version 1.15.9


SUMMARY
========

PARAMETERS
 * /rosdistro: noetic
 * /rosversion: 1.15.9

NODES

auto-starting new master
process[master]: started with pid [6437]
ROS_MASTER_URI=http://ubuntu:11311/

setting /run_id to 504fac3a-5870-11eb-becd-1bb2a86cd69c
process[rosout-1]: started with pid [6447]
started core service [/rosout]
3
4
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
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?