embeded/robot2026. 7. 3. 12:25

일단은 micro HDMI 연결해서 시도.

 

다행히 x11 forwarding으로 되네. 모니터 안달아도 되겠다

ros2shell
ros2 run turtlesim turtlesim_node
ros2 run turtlesim turtle_teleop_key

 

하라는 대로 해보면 아래처럼 나온다.

ssh로 해서 귀찮아서 백그라운드로 돌리고 쑈하는 중

G(gola), B(?) 누르면 아래처럼 메시지가 나온다.

(ros2 galactic py3)er@er:~$ ros2 run turtlesim turtlesim_node
[INFO] [1783047470.975415679] [turtlesim]: Starting turtlesim with node name /turtlesim
[INFO] [1783047470.985410507] [turtlesim]: Spawning turtle [turtle1] at x=[5.544445], y=[5.544445], theta=[0.000000]
^Z
[1]+  Stopped                 ros2 run turtlesim turtlesim_node
(ros2 galactic py3)er@er:~$ bg
[1]+ ros2 run turtlesim turtlesim_node &
(ros2 galactic py3)er@er:~$ 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.
[INFO] [1783047541.329042626] [turtlesim]: Rotation goal completed successfully
[INFO] [1783047541.872528190] [turtlesim]: Rotation goal completed successfully
[INFO] [1783047541.888733657] [turtlesim]: Rotation goal completed successfully
[INFO] [1783047541.904818475] [turtlesim]: Rotation goal completed successfully
[INFO] [1783047541.919834899] [turtlesim]: Rotation goal completed successfully
[INFO] [1783047541.952188870] [turtlesim]: Rotation goal completed successfully
[INFO] [1783047541.984665508] [turtlesim]: Rotation goal completed successfully
[INFO] [1783047542.016009140] [turtlesim]: Rotation goal completed successfully
[INFO] [1783047542.048402795] [turtlesim]: Rotation goal completed successfully
[INFO] [1783047542.080809062] [turtlesim]: Rotation goal completed successfully
[INFO] [1783047542.112165583] [turtlesim]: Rotation goal completed successfully
[INFO] [1783047542.144652053] [turtlesim]: Rotation goal completed successfully
[INFO] [1783047542.176082352] [turtlesim]: Rotation goal completed successfully
[INFO] [1783047542.192223411] [turtlesim]: Rotation goal completed successfully
[INFO] [1783047542.224715381] [turtlesim]: Rotation goal completed successfully
[INFO] [1783047542.256142236] [turtlesim]: Rotation goal completed successfully
[WARN] [1783047543.335142919] [turtlesim]: Rotation goal received before a previous goal finished. Aborting previous goal
[INFO] [1783047543.806747242] [turtlesim]: Rotation goal completed successfully
[WARN] [1783047545.833930732] [turtlesim]: Rotation goal received before a previous goal finished. Aborting previous goal
[INFO] [1783047545.834608550] [turtlesim]: Rotation goal completed successfully
[INFO] [1783047547.348717894] [turtlesim]: Rotation goal completed successfully

 

B 눌러서 살짝 돌아간 거북이

 

 

 

실행하면 먼가 나오는데

(ros2 galactic py3)er@er:~$ rqt_graph

 

hide 쪽 다 끄니 먼가 좀 나온다.

 

아니면 위에 topic을 적어주면 먼가 나온다.

[링크 : https://m.blog.naver.com/zeta0807/221775210962]

 

-v 옵션  줘서 topic list를 하면 위의 그래프와 동일한 내용이 나온다.

(ros2 galactic py3)er@er:~$ ros2 topic -h
usage: ros2 topic [-h] [--include-hidden-topics] Call `ros2 topic <command> -h` for more detailed usage. ...

Various topic related sub-commands

optional arguments:
  -h, --help            show this help message and exit
  --include-hidden-topics
                        Consider hidden topics as well

Commands:
  bw     Display bandwidth used by topic
  delay  Display delay of topic from timestamp in header
  echo   Output messages from a topic
  find   Output a list of available topics of a given type
  hz     Print the average publishing rate to screen
  info   Print information about a topic
  list   Output a list of available topics
  pub    Publish a message to a topic
  type   Print a topic's type

  Call `ros2 topic <command> -h` for more detailed usage.

(ros2 galactic py3)er@er:~$ ros2 topic list
/parameter_events
/rosout
/turtle1/cmd_vel
/turtle1/color_sensor
/turtle1/pose

(ros2 galactic py3)er@er:~$ ros2 topic list -v
Published topics:
 * /parameter_events [rcl_interfaces/msg/ParameterEvent] 2 publishers
 * /rosout [rcl_interfaces/msg/Log] 2 publishers
 * /turtle1/color_sensor [turtlesim/msg/Color] 1 publisher
 * /turtle1/pose [turtlesim/msg/Pose] 1 publisher

Subscribed topics:
 * /parameter_events [rcl_interfaces/msg/ParameterEvent] 2 subscribers
 * /turtle1/cmd_vel [geometry_msgs/msg/Twist] 1 subscriber

[링크 : https://docs.elephantrobotics.com/docs/gitbook-en/12-ApplicationBaseROS/12.2-ROS2/12.2.2-基础教程.html]

 

하라는 대로 하니 되긴한다. 좋네~

(ros2 galactic py3)er@er:~/colcon_ws$ colcon build --symlink-install
Starting >>> mycobot_description
Starting >>> mycobot_interfaces
Starting >>> mypalletizer_interfaces                                                       
Starting >>> mecharm_interfaces
Finished <<< mycobot_description [9.82s]                                                              
[Processing: mecharm_interfaces, mycobot_interfaces, mypalletizer_interfaces]                                             
[Processing: mecharm_interfaces, mycobot_interfaces, mypalletizer_interfaces]                                                 
Finished <<< mecharm_interfaces [1min 10s]                                              
[Processing: mycobot_interfaces, mypalletizer_interfaces]                               
[Processing: mycobot_interfaces, mypalletizer_interfaces]                               
Finished <<< mycobot_interfaces [2min 26s]                                               
Starting >>> mycobot_communication
Starting >>> mecharm_communication                                                                                    
Finished <<< mypalletizer_interfaces [2min 28s]                                                                           
Starting >>> mypalletizer_communication                                                               
Finished <<< mycobot_communication [10.3s]                                                                  
Starting >>> mybuddy
Starting >>> mycobot_280                                                                                                     
Finished <<< mecharm_communication [10.4s]                                                                      
Starting >>> mecharm
Finished <<< mypalletizer_communication [10.6s]                                                                        
Starting >>> mecharm_pi                                                                        
Finished <<< mecharm [13.1s]                                                                                          
Starting >>> mycobot_280jn
Finished <<< mybuddy [13.4s]                                                                                               
Starting >>> mycobot_280pi
Finished <<< mycobot_280 [13.5s]                                                                             
Starting >>> mycobot_320                                                                                    
Finished <<< mecharm_pi [11.9s]                                                                                 
Starting >>> mycobot_320pi                                                                                  
Finished <<< mycobot_280jn [12.5s]                                                                                
Starting >>> mypalletizer_260
Finished <<< mycobot_320 [12.7s]                                                                                 
Finished <<< mycobot_280pi [14.6s]                                                                               
Starting >>> mypalletizer_260_pi
Starting >>> ultraarm
Finished <<< mycobot_320pi [11.3s]                                                                                         
Finished <<< mypalletizer_260 [10.2s]                                                                              
Finished <<< mypalletizer_260_pi [10.3s]                                                  
Finished <<< ultraarm [10.3s]

Summary: 18 packages finished [3min 17s]
(ros2 galactic py3)er@er:~/colcon_ws$ source install/setup.bash
(ros2 galactic py3)er@er:~/colcon_ws$ ros2 launch mycobot_280pi slider_control.launch.py

[INFO] [launch]: All log files can be found below /home/er/.ros/log/2026-07-03-11-17-17-203959-er-9929
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [robot_state_publisher-1]: process started with pid [9959]
[INFO] [joint_state_publisher_gui-2]: process started with pid [9961]
[INFO] [rviz2-3]: process started with pid [9963]
[INFO] [slider_control-4]: process started with pid [9965]
[robot_state_publisher-1] Link joint2 had 1 children
[robot_state_publisher-1] Link joint3 had 1 children
[robot_state_publisher-1] Link joint4 had 1 children
[robot_state_publisher-1] Link joint5 had 1 children
[robot_state_publisher-1] Link joint6 had 1 children
[robot_state_publisher-1] Link joint6_flange had 0 children
[robot_state_publisher-1] [INFO] [1783048639.394243790] [robot_state_publisher]: got segment joint1
[robot_state_publisher-1] [INFO] [1783048639.394549934] [robot_state_publisher]: got segment joint2
[robot_state_publisher-1] [INFO] [1783048639.394636748] [robot_state_publisher]: got segment joint3
[robot_state_publisher-1] [INFO] [1783048639.394680932] [robot_state_publisher]: got segment joint4
[robot_state_publisher-1] [INFO] [1783048639.394718784] [robot_state_publisher]: got segment joint5
[robot_state_publisher-1] [INFO] [1783048639.394756061] [robot_state_publisher]: got segment joint6
[robot_state_publisher-1] [INFO] [1783048639.394793246] [robot_state_publisher]: got segment joint6_flange
[joint_state_publisher_gui-2] [INFO] [1783048643.531952578] [joint_state_publisher]: Waiting for robot_description to be published on the robot_description topic...
[joint_state_publisher_gui-2] [INFO] [1783048643.610075662] [joint_state_publisher]: Centering
[joint_state_publisher_gui-2] [INFO] [1783048644.027434405] [joint_state_publisher]: Centering
[rviz2-3] [INFO] [1783048644.403594556] [rviz2]: Stereo is NOT SUPPORTED
[rviz2-3] [INFO] [1783048644.404085494] [rviz2]: OpenGl version: 3.1 (GLSL 1.4)
[rviz2-3] [INFO] [1783048647.151156049] [rviz2]: Stereo is NOT SUPPORTED
[slider_control-4] array('d', [0.0, 0.0, 0.0, 0.0, 0.0, 0.0])
[slider_control-4] array('d', [-0.0004613180000001549, -0.0004613180000001549, -0.0004613180000001549, -0.0004613180000001549, -0.0004613180000001549, -0.0004613180000001549])

 

 

 

실제 장비가 움직이는진 모르겠지만 뜨긴한다.

$ ros2 launch mycobot_280 test.launch.py
[INFO] [launch]: All log files can be found below /home/er/.ros/log/2026-07-03-11-23-38-154196-er-10335
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [robot_state_publisher-1]: process started with pid [10367]
[INFO] [joint_state_publisher_gui-2]: process started with pid [10369]
[INFO] [rviz2-3]: process started with pid [10371]
[robot_state_publisher-1] Link joint2 had 1 children
[robot_state_publisher-1] Link joint3 had 1 children
[robot_state_publisher-1] Link joint4 had 1 children
[robot_state_publisher-1] Link joint5 had 1 children
[robot_state_publisher-1] Link joint6 had 1 children
[robot_state_publisher-1] Link joint6_flange had 0 children
[robot_state_publisher-1] Link env had 0 children
[robot_state_publisher-1] [INFO] [1783049020.099496084] [robot_state_publisher]: got segment env
[robot_state_publisher-1] [INFO] [1783049020.099850118] [robot_state_publisher]: got segment joint1
[robot_state_publisher-1] [INFO] [1783049020.099978210] [robot_state_publisher]: got segment joint2
[robot_state_publisher-1] [INFO] [1783049020.100036728] [robot_state_publisher]: got segment joint3
[robot_state_publisher-1] [INFO] [1783049020.100077783] [robot_state_publisher]: got segment joint4
[robot_state_publisher-1] [INFO] [1783049020.100116357] [robot_state_publisher]: got segment joint5
[robot_state_publisher-1] [INFO] [1783049020.100152116] [robot_state_publisher]: got segment joint6
[robot_state_publisher-1] [INFO] [1783049020.100192041] [robot_state_publisher]: got segment joint6_flange
[rviz2-3] [INFO] [1783049023.998647585] [rviz2]: Stereo is NOT SUPPORTED
[rviz2-3] [INFO] [1783049023.999256988] [rviz2]: OpenGl version: 3.1 (GLSL 1.4)
[joint_state_publisher_gui-2] [INFO] [1783049024.105868138] [joint_state_publisher]: Waiting for robot_description to be published on the robot_description topic...
[joint_state_publisher_gui-2] [INFO] [1783049024.137961673] [joint_state_publisher]: Centering
[joint_state_publisher_gui-2] [INFO] [1783049024.490631764] [joint_state_publisher]: Centering
[rviz2-3] [INFO] [1783049026.693983324] [rviz2]: Stereo is NOT SUPPORTED

 

[링크 : https://docs.elephantrobotics.com/docs/gitbook-en/12-ApplicationBaseROS/12.2-ROS2/12.2.4-rviz介绍及使用/myCobot-280.html]

'embeded > robot' 카테고리의 다른 글

mycobot ros1/ros2  (0) 2026.07.02
gcode (g-code)  (0) 2026.07.01
mycobot280 pi / TCP(tool center point)  (0) 2026.06.30
mycobot 280 pi / python  (0) 2026.06.29
왼손 오른손 좌표계  (0) 2026.06.22
Posted by 구차니