13
14

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 5 years have passed since last update.

SLAM(Jetson nano&ROS melodic)動かしてみた^^

Last updated at Posted at 2019-10-28

#SLAM(Jetson nano&ROS melodic)^^

Jetson nano&ROS melodicでSLAM動かしてみました!!!
壊れたとき用のメモです。。。3回壊してます。。。。^^!!!!!!
#SLAMとは

SLAM(スラム)とは、自己位置推定と環境地図作成を同時に行うことを言う。
正式名称は、Simultaneous Localization and Mapping。
https://ja.wikipedia.org/wiki/SLAM

#動かし方
主にSLAMは@protocol1964 さんの記事を参考にしています。こちらからどうぞ!!!
ROS MelodicでTurtlebot3をGazeboで動かしてついでにSLAMする
私はただただJetson nanoでしてるだけです^^

#ROSインストール

こちらにまとめております。
Jetson nano ROS(Melodic)インストール〜Gazeboまで

#パッケージ

sudo apt-get install ros-melodic-joy ros-melodic-teleop-twist-joy ros-melodic-teleop-twist-keyboard ros-melodic-laser-proc ros-melodic-rgbd-launch ros-melodic-depthimage-to-laserscan ros-melodic-rosserial-arduino ros-melodic-rosserial-python ros-melodic-rosserial-server ros-melodic-rosserial-client ros-melodic-rosserial-msgs ros-melodic-amcl ros-melodic-map-server ros-melodic-move-base ros-melodic-urdf ros-melodic-xacro ros-melodic-compressed-image-transport ros-melodic-rqt-image-view ros-melodic-navigation'

#環境構築
ワークスペース

$ mkdir -p ~/catkin_ws/src
$ cd ~/catkin_ws/src
$ catkin_init_workspace
$ cd ~/catkin_ws

クローン。。。昔、リボーンみてた。

$ cd ~/catkin_ws/src
$ git clone https://github.com/ROBOTIS-GIT/turtlebot3.git
$ git clone https://github.com/ROBOTIS-GIT/turtlebot3_msgs.git
$ git clone https://github.com/ROBOTIS-GIT/turtlebot3_simulations.git
$ git clone https://github.com/ROBOTIS-GIT/turtlebot3_gazebo_plugin.git

最後はビルド!

$ cd ~/catkin_ws
$ catkin_make
$ source ~/catkin_ws/devel/setup.bash

#Rviz

$ export TURTLEBOT3_MODEL=burger
$ roslaunch turtlebot3_fake turtlebot3_fake.launch
$ roslaunch turtlebot3_teleop turtlebot3_teleop_key.launch

#Gazebo

$ roslaunch turtlebot3_gazebo turtlebot3_world.launch

これでたら

terminate called after throwing an instance of 'std::runtime_error'
  what():  locale::facet::_S_create_c_locale name not valid

これ

$ export LC_ALL=C; unset LANGUAGE

#gmapping

クローン。今回は真面目に。

$ cd ~/catkin_ws/src
$ git clone https://github.com/ros-perception/slam_gmapping.git
$ git clone https://github.com/ros-perception/openslam_gmapping.git
$ git clone https://github.com/ros-planning/navigation_msgs.git
$ git clone https://github.com/ros-planning/navigation.git
$ git clone https://github.com/ros/geometry2.git

ビルド

$ cd ~/catkin_ws
$ catkin_make
$ source ~/catkin_ws/devel/setup.bash

#いざ、動作確認へ!
Gazeboとteleopコントローラ

###ターミナル1

cd ~/catkin_ws
source ~/catkin_ws/devel/setup.bash
export TURTLEBOT3_MODEL=burger
roslaunch turtlebot3_gazebo turtlebot3_world.launch

###ターミナル2

cd ~/catkin_ws
source ~/catkin_ws/devel/setup.bash
export TURTLEBOT3_MODEL=burger
roslaunch turtlebot3_teleop turtlebot3_teleop_key.launch

###ターミナル3

gmapping

cd ~/catkin_ws
source ~/catkin_ws/devel/setup.bash
export TURTLEBOT3_MODEL=burger
roslaunch turtlebot3_slam turtlebot3_slam.launch slam_methods:=gmapping

よいしょーーーーー!!!!!!

5V2Aでもなんとか、、、

image.png

##CPU・メモリ

image.png

あらま。。。ご参考までに。。。

#参考文献

ROS MelodicでTurtlebot3をGazeboで動かしてついでにSLAMする

これはMeRT(ルット)。
Jetson nano ROS(Melodic)インストール〜Gazeboまで

13
14
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
13
14

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?