スキップしてメイン コンテンツに移動

Apex.AI: Autoware (강의3)

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


강의 뒷부분에서 터틀봇을 서비스와 액션을 이용해서 제어하는 방법을 알려준다. 


コメント

このブログの人気の投稿

[참고] ROS kinetic에서 WebCam 사용하기 (Ubuntu 16.04)

Reference: 1. https://github.com/bosch-ros-pkg/usb_cam/issues/53  2. http://zumashi.blogspot.jp/2016/12/ros-kinetic-usb-cam.html  3. http://cafe.naver.com/openrt/5963 위의 사이트들을 참고하여 ROS Kinetic에서 Logitech WebCam C270의 동작을 확인했습니다. $ cd ~/catkin_ws/src $ git clone https://github.com/bosch-ros-pkg/usb-cam.git $ cd .. $ catkin_make WebCam test $ roscore $ rosrun usb_cam usb_cam_node $ rosrun image_view image_view image:=/usb_cam/image_raw $ rosrun rviz rviz 1) By display type>rviz>image 2) Image topic: /usb_cam/image_raw --> 왼쪽 하단과 같이 WebCam이 잘 동작하는 것을 확인했습니다.

[vscode] TImeout waiting for debugger connection

이제까지 잘 동작하던 비주얼 스튜디오 코드가 위와 같은 에러 메세지를 내면서 갑자기 디버깅이 안되서 인터넷을 검색한 결과.. vscode의 User Setting에서 검색창에 python.terminal.activateEnvironment을 입력하여 true로 설정되어 있는 값을 false로 변환하면 된다. 

日常の話

今年の夏は本当に暑かったですね。それで、我らもなるべく室内で活動しました。図書館で絵本を読んでいる長男さん。 カラオケ大会〜〜 漫画を読んでいた長女 長男はおもちゃで遊んでました。 魚べいで外食 橋コンテストで出品する作品を作る次女 長男が大好きなマインクラフトレゴ。官舎の壁は長男の落書きで大変な状態です。 お父さん、お母さんが作って下さった美味しい料理 お父さんのハヤシライスは美味しい! 頑張って運動している長男 親切に教えてくれた先生たち、ありがとうございました。 JAXA来年までメイン建物が運営しません!ご参考までに〜〜 長女と長男、図書室の中で〜〜