ROS2의 이야기가 계속된다.
2강 3강의 내용은 ROS1을 접해본 적이 있거나, 현재 ROS1으로 개발하고 있는 경우에는 큰 어려움 없이 이해할 수 있다. ROS2 튜토리얼을 보면 다 나와있는거지만 유튜브 보면서 따라하면 지루하지 않은 장점이 있을까나^^;
참고자료:
강의자료:
유튜브:
sip2@sip2-NG-N-i5750:~$ cd adehome/
sip2@sip2-NG-N-i5750:~/adehome$ ls
AutowareAuto autowareclass2020 data ros2_example_ws
sip2@sip2-NG-N-i5750:~/adehome$ cd AutowareAuto/
sip2@sip2-NG-N-i5750:~/adehome/AutowareAuto$ ade start
Starting ade with the following images:
ade | 18425565a9fd | master | registry.gitlab.com/autowarefoundation/autoware.auto/autowareauto/ade:master
ade-atom | v1.39.1 | latest | registry.gitlab.com/apexai/ade-atom:latest
autowareauto | c9dbc109642c | master | registry.gitlab.com/autowarefoundation/autoware.auto/autowareauto:master
ade_registry.gitlab.com_apexai_ade-atom_latest
ade_registry.gitlab.com_autowarefoundation_autoware.auto_autowareauto_master
non-network local connections being added to access control list
Current default time zone: 'Asia/Tokyo'
Local time is now: Tue May 26 07:27:17 JST 2020.
Universal Time is now: Mon May 25 22:27:17 UTC 2020.
Adding user sip2 to group video
Adding user sip2 to group dialout
Initializing /opt/atom
Initializing /opt/atom done
ADE startup completed.
ADE has been started, enter or run commands using: ade enter
sip2@sip2-NG-N-i5750:~/adehome/AutowareAuto$ ade enter
Entering ade with following images:
ade | 18425565a9fd | master | registry.gitlab.com/autowarefoundation/autoware.auto/autowareauto/ade:master
ade-atom | v1.39.1 | latest | registry.gitlab.com/apexai/ade-atom:latest
autowareauto | c9dbc109642c | master | registry.gitlab.com/autowarefoundation/autoware.auto/autowareauto:master
예습을 위한 환경 설정 및 인스톨
sip2@ade:~$ source /opt/ros/dashing/setup.bash
sip2@ade:~$ sudo apt update
sip2@ade:~$ sudo apt install ros-dashing-turtlesim
sip2@ade:~$ sudo apt install ros-dashing-rqt-*
sip2@ade:~$ sudo apt install byobu
sip2@ade:~$ ros2 --help
usage: ros2 [-h] Call `ros2 <command> -h` for more detailed usage. ...
ros2 is an extensible command-line tool for ROS 2.
optional arguments:
-h, --help show this help message and exit
Commands:
action Various action related sub-commands
bag Various rosbag related sub-commands
component Various component related sub-commands
daemon Various daemon related sub-commands
launch Run a launch file
lifecycle Various lifecycle related sub-commands
msg Various msg related sub-commands
multicast Various multicast related sub-commands
node Various node related sub-commands
param Various param related sub-commands
pkg Various package related sub-commands
run Run a package specific executable
security Various security related sub-commands
service Various service related sub-commands
srv Various srv related sub-commands
test Run a ROS2 launch test
topic Various topic related sub-commands
Call `ros2 <command> -h` for more detailed usage.
ROS의 Hello world인 터틀 봇 제어해보기
새창1
sip2@ade:~$ ros2 run turtlesim turtlesim_node
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-sip2'
[INFO] [turtlesim]: Starting turtlesim with node name /turtlesim
[INFO] [turtlesim]: Spawning turtle [turtle1] at x=[5.544445], y=[5.544445], theta=[0.000000]
새창2
sip2@ade:~$ source /opt/ros/dashing/setup.bash
sip2@ade:~$ ros2 run turtlesim turtle_teleop_key
Reading from keyboard
---------------------------
Use arrow keys to move the turtle.
Use G|B|V|C|D|E|R|T keys to rotate to absolute orientations. 'F' to cancel a rotation.
'Q' to quit.
새창3
sip2@ade:~$ ros2 node list --all
/_ros2cli_daemon_0
/teleop_turtle
/turtlesim
sip2@ade:~$ ros2 topic list
/parameter_events
/rosout
/turtle1/cmd_vel
/turtle1/color_sensor
/turtle1/pose
sip2@ade:~$ ros2 topic bw -w 100 /turtle1/pose
Subscribed to [/turtle1/pose]
average: 1.52KB/s
mean: 0.02KB min: 0.02KB max: 0.02KB window: 63
average: 1.50KB/s
mean: 0.02KB min: 0.02KB max: 0.02KB window: 100
average: 1.51KB/s
mean: 0.02KB min: 0.02KB max: 0.02KB window: 100
average: 1.50KB/s
mean: 0.02KB min: 0.02KB max: 0.02KB window: 100
average: 1.51KB/s
mean: 0.02KB min: 0.02KB max: 0.02KB window: 100
sip2@ade:~$ rqt
sip2@ade:~$ rqt_graph
강의 뒷부분에서 터틀봇을 서비스와 액션을 이용해서 제어하는 방법을 알려준다.
コメント
コメントを投稿