Qiitaに初投稿します。Ninagawa_Izumiです。なにかお役に立てれば。
Make ROS melodic work on Buster of Raspberry Pi 4. While referring to various places, I tried to describe it in an OK way if I keep typing shell commands anyway. I'm sure everyone can deploy the latest ROS environment as of January 2020.
An open source platform aimed at promoting joint development of robot software on a global scale. Information such as sensors and actuators and simulators can be handled in an integrated manner.
--Raspbian-Raspberry Pi 4 with Buster installed
Open LXTerminal etc., copy and paste the code line by line, and press the return key repeatedly. Below, the code part (text on a black background) is a shell script that you type in the terminal. Is your Raspberry Pi 4 running? Let's type in more and more!
python
cat /etc/debian_version
Result example> 7.8
python
uname -a
Result example> Linux raspberry 4.19.75-v71 + Honyara
python
sudo apt-get update
sudo apt-get upgrade
If you are in a hurry, you may skip this item. It takes a lot of time.
$ sudo apt-get update
Will do it again later
$ sudo apt-get upgrade
Will take a long time to complete.
Reference URL) https://www.instructables.com/id/ROS-Melodic-on-Raspberry-Pi-4-RPLIDAR/ Reference URL) http://wiki.ros.org/melodic/Installation/Debian
python
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
sudo apt-get update
python
sudo apt-get install -y python-rosdep python-rosinstall-generator python-wstool python-rosinstall build-essential cmake
sudo rosdep init
rosdep update
python
mkdir ~/ros_catkin_ws
cd ~/ros_catkin_ws
python
rosinstall_generator desktop --rosdistro melodic --deps --wet-only --tar > melodic-desktop-wet.rosinstall
wstool init -j8 src melodic-desktop-wet.rosinstall
If the above installation stops prematurely, you can restart it with `` `$ wstool update -j4 -t src```.
python
mkdir -p ~/ros_catkin_ws/external_src
cd ~/ros_catkin_ws/external_src
wget http://sourceforge.net/projects/assimp/files/assimp-3.1/assimp-3.1.1_no_test_models.zip/download -O assimp-3.1.1_no_test_models.zip
unzip assimp-3.1.1_no_test_models.zip
cd assimp-3.1.1
cmake .
make
sudo make install
python
sudo apt-get install libogre-1.9-dev
In the procedure explained in the reference URL, the file modification (boost :: posix_time :: milliseconds related) is instructed here, but it seems that it has already been modified by the package, so it is necessary as of January 2020 There is none.
python
cd ~/ros_catkin_ws #20200226 Addendum
rosdep install --from-paths src --ignore-src --rosdistro melodic -y
python
sudo ./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release --install-space /opt/ros/melodic -j2
echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc
python
sudo reboot
This completes the installation of ROS-melodic. If you can restart it, it's finally time to check the operation.
python
roscore
Thank you for your hard work! If you see a display like this, ROSCORE is working. Congratulations.
Open a new terminal that is different from the one you opened for roscore and do the following:
python
rosrun turtlesim turtlesim_node
You should see a window with a small turtle.
Open another terminal and do the following:
python
rosrun turtlesim turtle_teleop_key
If you activate this terminal and press the cursor key, you can operate the turtle in the previous window.
python
rosrun rqt_graph
The relationship between NODE and TOPIC flow is visualized.
python
rviz
I feel the power of Raspberry Pi 4 when starting at a second speed.
How was it? Did you successfully introduce ROS-melodic? I have implemented this procedure twice and it has been successful, but if there is something that does not work, please share it in the comment section. In this state, it is still difficult to use, so in the environment at hand, various settings are made to make it convenient for development. I also found some tips on how to back up SD, so I hope I can introduce it in another entry.
[Qiita] SD card backup and SD card selection for Raspberry Pi (Mac)
Recommended Posts