본문 바로가기

기계공학부 시절의 기록/ROS2 Study12

11 week HW (3) Command line argument $ ros2 run $ ros2 run 1. revise action client node to command argument in code 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 # add modul.. 2021. 11. 16.
11 week HW (2) Parameter programming review https://needs-searcher.tistory.com/181 6 week HW Parameter control using turtlesim node Experiment of ROS2 parameter, RQt, and ROS2 package installation 1. parameter 2. ROS2 tools - Command Line Tools https://github.com/ubuntu-robotics/ros2_cheats_sheet/blob/master/cli/cli_cheats_shee.. needs-searcher.tistory.com command list see a list of parma $ ros2 param list get value of a param $ ro.. 2021. 11. 16.
11 week HW (1) action programming : action client node 1. write "fibonacci_action_client.py" code 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 import rclpy # import ActionClient class to make actionclient from rclpy.action import ActionClient from rclpy.node import Node # import Fibonacci interface type from my_interface_example.action i.. 2021. 11. 14.
10 week HW (3) action programming : action server node 1. make package 2. make python file 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 import rclpy # import ActionServer class to make actionserver from rclpy.action import ActionServer from rclpy.node import Node # import Fibonacci interface type from my_interface_example.action import Fibonacci class FibonacciAction.. 2021. 11. 9.
10 week HM (2) : create action interface [make action file] goal --- result --- feedback [revise CmakeList.txt] [check the interface] 2021. 11. 9.
10 week HM (1) service programming Message, Service interface programming - Test the created msg interface [pub_node] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 import rclpy # Node class import. In Node class, there are create_publisher(), create_timer().. 2021. 11. 9.
8week ROS homework : Simple node code explain #1 Create Topic msg 1. Write code [helloworld_publisher.py] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 import rclpy # Node class import. In Node classm, there are create_publisher(), create_timer(), get_logger() and so on. from rclpy.node i.. 2021. 10. 25.
ROS homework week7 1. Create Package [for cpp] [for python] 2. Build Package 3. Dependencies Problem Solving $ sudo rosdep init $ rosdep update $ rosdep install -i from-path src --rosdistro foxy -y $ rosdep install -i from-path sr --ignore-src --rosdistro foxy -y --skip-keys ROS2 package files 1. for cpp package.xml CmakeList.txt 2. for python package.xml setup.py essential optional only python $ . install/setup.b.. 2021. 10. 18.
6 week HW Parameter control using turtlesim node Experiment of ROS2 parameter, RQt, and ROS2 package installation 1. parameter 2. ROS2 tools - Command Line Tools https://github.com/ubuntu-robotics/ros2_cheats_sheet/blob/master/cli/cli_cheats_sheet.pdf tab key - RQt 3. ROS2 filesystems package installation method 1) binary sudo apt install ros-foxy- 2) source code from github 2021. 10. 12.
ROS2 course week5. homework 1. service call $ ros2 run turtlesim $ ros2 run turtlesim turtle_teleop_key $ ros2 service call /clear std_srvs/srv/Empty $ ros2 service call /turtle1/set_pen turtlesim/srv/SetPen "{r: 255, g: 0, b: 0, width: 10}" $ ros2 service call /spawn turtlesim/srv/Spawn "{x: 2, y: 2, theta: 0.2, name: 'turtle3'}" 2. action $ ros2 action list -t $ ros2 action info /turtle1/rotate_absolute $ ros2 action sen.. 2021. 10. 6.
ROS2 course week4. homework 1. run turtlesim $ ros2 run turtlesim turtlesim_node $ ros2 run turtlesim turtle_teleop_key $ rqt_graph * executable name is not same with real node name 2. node a single purpose, reusable $ ros2 run $ ros2 pkg list and find executable nodes in a package $ ros2 pkg excutables 3. run the same node with different name $ ros2 run turtlesim turtlesim_node --ros-args --remap __node:=turtle2 or $ ros2.. 2021. 10. 6.
[ROS2 install] VM or dual OS(Ubuntu 20.04) 그리고 ROS2 VM으로 할까 듀얼OS로 할까 고민하다가 듀얼OS로 진행하였다. 그 이유는 1. VM으로 진행시 아래와 같은 저장공간 부족의 에러가 발생하였다. 구글링으로 이것저것 시도했지만 실패 2. ROS 커뮤니티 오로카에서 표박사님이 VM은 절대비추라고 하심. 성능저하 이유 아무튼 어제 반나절과 오늘 아침을 쓴 결과로 듀얼os상에서 ROS2 설치를 마무리하였다. 그 과정에서 몇가지 어려움이 있었는데 이에 대해서 정리해두려고 한다. 1) [듀얼 OS설치] https://www.youtube.com/watch?v=DF_TiZrwPAA를 참고. 2) 우분투 설치를 마친 뒤 재부팅시 usb 뽑을 것. 3) [GRUB noshow]이 후 재부팅 시 os선택 화면 없이 윈도우가 켜지는 문제발생 --> https://inpag.. 2021. 9. 13.