masuko-shingo / -7-29_Turtlebot3_setup-

7/29 勉強会 turtlebot3のセットアップ用リポジトリ
0 stars 0 forks source link

log #1

Open masuko-shingo opened 3 years ago

masuko-shingo commented 3 years ago
$ sudo apt install ros-melodic-gmapping

一つのパッケージづつsudo apt install

sudo apt 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 

途中から

$ sudo apt install 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*

後に

$ sudo apt update

後、もう一度ひとつづつsudo apt install

$ sudo apt install 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*
$ sudo apt install ros-melodic-navigation
$ sudo apt install ros-melodic-interactive-markers
$ sudo apt install ros-melodic-rqt-image-view

もう一度

$ sudo apt update

とりあえずやる

$ sudo apt install ros-melodic-dynamixel-sdk
$ sudo apt install ros-melodic-turtlebot3-msgs
$ sudo apt install ros-melodic-turtlebot3

make

$ cd ~/catkin_ws/
$ catkin_make

gazebo_pluginをclone、make

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

sourceしてみて実行

$ source ~/catkin_ws/devel/setup.bash
$ roslaunch turtlebot3_fake turtlebot3_fake.launch
... logging to /home/masuko/.ros/log/2fea74f2-f52d-11eb-a9f9-7c7635a4ab69/roslaunch-masuko-PC-VKM24BZG1-22210.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.

xacro: in-order processing became default in ROS Melodic. You can drop the option.
started roslaunch server http://192.168.0.42:36375/

SUMMARY
========

PARAMETERS
 * /robot_description: <?xml version="1....
 * /robot_state_publisher/publish_frequency: 50.0
 * /rosdistro: melodic
 * /rosversion: 1.14.10
 * /tb3_model: burger

NODES
  /
    robot_state_publisher (robot_state_publisher/robot_state_publisher)
    rviz (rviz/rviz)
    turtlebot3_fake_node (turtlebot3_fake/turtlebot3_fake_node)

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

setting /run_id to 2fea74f2-f52d-11eb-a9f9-7c7635a4ab69
process[rosout-1]: started with pid [22246]
started core service [/rosout]
ERROR: cannot launch node of type [turtlebot3_fake/turtlebot3_fake_node]: Cannot locate node of type [turtlebot3_fake_node] in package [turtlebot3_fake]. Make sure file exists in package path and permission is set to executable (chmod +x)
process[robot_state_publisher-3]: started with pid [22249]
process[rviz-4]: started with pid [22254]
/opt/ros/melodic/lib/rviz/rviz: symbol lookup error: /opt/ros/melodic/lib/libtf.so: undefined symbol: _ZN7tf2_ros17TransformListenerC1ERN3tf210BufferCoreERKN3ros10NodeHandleEb
[rviz-4] process has died [pid 22254, exit code 127, cmd /opt/ros/melodic/lib/rviz/rviz -d /home/masuko/catkin_ws/src/turtlebot3_simulations/turtlebot3_fake/rviz/turtlebot3_fake.rviz __name:=rviz __log:=/home/masuko/.ros/log/2fea74f2-f52d-11eb-a9f9-7c7635a4ab69/rviz-4.log].
log file: /home/masuko/.ros/log/2fea74f2-f52d-11eb-a9f9-7c7635a4ab69/rviz-4*.log
^C[robot_state_publisher-3] killing on exit
[rosout-1] killing on exit
[master] killing on exit
shutting down processing monitor...
... shutting down processing monitor complete
done

エラーが出る

$ source /opt/ros/melodic/setup.bash
$ export TURTLEBOT3_MODEL=burger
$ roslaunch turtlebot3_fake turtlebot3_fake.launch 

同じく

$ source devel/setup.bash
$ export TURTLEBOT3_MODEL=burger
$ roslaunch turtlebot3_fake turtlebot3_fake.launch 

同じく

$ rviz

roscoreしないと開かない おそらく.bashrcのROS_MASTERとかのIPアドレスのせい
ROBOTISの動画を見て以下を試した

$ cd ~/catkin_ws/src/turtlebot3_simulations/turtlebot3_gazebo
$ mkdir build
$ cd build
$ cmake ..

その後

$ make

gazeboが立ち上がるか試す

$ gazebo worlds/turtlebot3_burger.world
[Err] [REST.cc:205] Error in REST request

libcurl: (51) SSL: no alternative certificate subject name matches target host name 'api.ignitionfuel.org'

エラーが出た。検索かけたら解決策を見つけたので試す

$ cd ~/.ignition/fuel
$ ls
config.yaml

configファイルの一部行を変更

Where are the assets stored in disk.

cache:

path: /tmp/ignition/fuel


gazeboがエラーなしで開くようになった。
masuko-shingo commented 3 years ago

SLAM simulate

$ export TURTLEBOT3_MODEL=burger
$ roslaunch turtlebot3_gazebo turtlebot3_world.launch

ctrl+alt+t

$ roslaunch turtlebot3_slam turtlebot3_slam.launch slam_methods:=gmapping

ctrl+alt+t

$ roslaunch turtlebot3_teleop turtlebot3_teleop_key.launch