< >
Home » ROS2与OpenManipulator-X入门教程#humble版# » ROS2与OpenManipulator-X入门教程#humble版#-基本启动

ROS2与OpenManipulator-X入门教程#humble版#-基本启动

文章说明

  • 本教程主要介绍omx机械臂的基本启动

操作步骤

  • 启动机械臂
# 使用U2D2作为驱动板
$ ros2 launch open_manipulator_x_bringup hardware.launch.py
# 使用openCR作为驱动板
$ ros2 launch open_manipulator_x_bringup hardware.launch.py port_name:=/dev/ttyACM0
  • 启动正常后,终端会有如下输出
[INFO] [launch]: All log files can be found below /home/ubuntu/.ros/log/2024-12-17-18-07-17-373174-TB3VM-V401-72614
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [ros2_control_node-1]: process started with pid [72617]
[INFO] [robot_state_publisher-2]: process started with pid [72619]
[INFO] [spawner-3]: process started with pid [72621]
[robot_state_publisher-2] [INFO] [1734430037.775863901] [robot_state_publisher]: got segment dummy_mimic_fix
[robot_state_publisher-2] [INFO] [1734430037.776479265] [robot_state_publisher]: got segment end_effector_link
[robot_state_publisher-2] [INFO] [1734430037.776669002] [robot_state_publisher]: got segment gripper_left_link
[robot_state_publisher-2] [INFO] [1734430037.776676145] [robot_state_publisher]: got segment gripper_right_link
[robot_state_publisher-2] [INFO] [1734430037.776680664] [robot_state_publisher]: got segment link1
[robot_state_publisher-2] [INFO] [1734430037.776684653] [robot_state_publisher]: got segment link2
[robot_state_publisher-2] [INFO] [1734430037.776688168] [robot_state_publisher]: got segment link3
[robot_state_publisher-2] [INFO] [1734430037.776691805] [robot_state_publisher]: got segment link4
[robot_state_publisher-2] [INFO] [1734430037.776695840] [robot_state_publisher]: got segment link5
[robot_state_publisher-2] [INFO] [1734430037.776699463] [robot_state_publisher]: got segment world
[ros2_control_node-1] [WARN] [1734430037.784721521] [controller_manager]: [Deprecated] Passing the robot description parameter directly to the control_manager node is deprecated. Use '~/robot_description' topic from 'robot_state_publisher' instead.
[ros2_control_node-1] [INFO] [1734430037.785491744] [resource_manager]: Loading hardware 'OpenManipulatorXSystem' 
[ros2_control_node-1] [INFO] [1734430037.797827217] [resource_manager]: Initialize hardware 'OpenManipulatorXSystem' 
[ros2_control_node-1] transmission_to_joint_matrix_ 
[ros2_control_node-1] [0][0] 1.000000, [0][1] 0.000000, [0][2] 0.000000, [0][3] 0.000000, [0][4] 0.000000, 
[ros2_control_node-1] [1][0] 0.000000, [1][1] 1.000000, [1][2] 0.000000, [1][3] 0.000000, [1][4] 0.000000, 
[ros2_control_node-1] [2][0] 0.000000, [2][1] 0.000000, [2][2] 1.000000, [2][3] 0.000000, [2][4] 0.000000, 
[ros2_control_node-1] [3][0] 0.000000, [3][1] 0.000000, [3][2] 0.000000, [3][3] 1.000000, [3][4] 0.000000, 
[ros2_control_node-1] [4][0] 0.000000, [4][1] 0.000000, [4][2] 0.000000, [4][3] 0.000000, [4][4] 1.000000, 
[ros2_control_node-1] [5][0] 0.000000, [5][1] 0.000000, [5][2] 0.000000, [5][3] 0.000000, [5][4] 0.000000, 
[ros2_control_node-1] joint_to_transmission_matrix_ 
[ros2_control_node-1] [0][0] 1.000000, [0][1] 0.000000, [0][2] 0.000000, [0][3] 0.000000, [0][4] 0.000000, [0][5] 0.000000, 
[ros2_control_node-1] [1][0] 0.000000, [1][1] 1.000000, [1][2] 0.000000, [1][3] 0.000000, [1][4] 0.000000, [1][5] 0.000000, 
[ros2_control_node-1] [2][0] 0.000000, [2][1] 0.000000, [2][2] 1.000000, [2][3] 0.000000, [2][4] 0.000000, [2][5] 0.000000, 
[ros2_control_node-1] [3][0] 0.000000, [3][1] 0.000000, [3][2] 0.000000, [3][3] 1.000000, [3][4] 0.000000, [3][5] 0.000000, 
[ros2_control_node-1] [4][0] 0.000000, [4][1] 0.000000, [4][2] 0.000000, [4][3] 0.000000, [4][4] 1.000000, [4][5] 0.000000, 
[ros2_control_node-1] [INFO] [1734430037.798331912] [dynamixel_hardware_interface]: port_name /dev/ttyACM0 / baudrate 1000000
[ros2_control_node-1] Dynamixel Information File List.
[ros2_control_node-1] num: 1000, name: xh430_w350.model
[ros2_control_node-1] num: 1020, name: xm430_w350.model
[ros2_control_node-1] num: 1060, name: xl430_w250.model
[ros2_control_node-1] num: 1080, name: xc430_w240.model
[ros2_control_node-1] num: 1100, name: xh540_w270.model
[ros2_control_node-1] num: 1160, name: 2xc430_w250.model
[ros2_control_node-1] num: 4000, name: ym070_210_m001.model
[ros2_control_node-1] num: 4020, name: ym070_210_r051.model
[ros2_control_node-1] num: 4030, name: ym070_210_r099.model
[ros2_control_node-1] num: 4050, name: ym070_210_a099.model
[ros2_control_node-1] num: 4120, name: ym080_230_m001.model
[ros2_control_node-1] num: 4140, name: ym080_230_r051.model
[ros2_control_node-1] num: 4150, name: ym080_230_r099.model
[ros2_control_node-1] num: 4170, name: ym080_230_a099.model
[ros2_control_node-1] num: 35074, name: rh_p12_rn.model
[ros2_control_node-1] [INFO] [1734430037.798983589] [dynamixel_hardware_interface]: $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
[ros2_control_node-1] [INFO] [1734430037.799002238] [dynamixel_hardware_interface]: $$$$$ Init Dxl Comm Port
[ros2_control_node-1] [INFO] [1734430037.799020347] [dynamixel_hardware_interface]: Revolute to Prismatic gripper conversion enabled.
[ros2_control_node-1] Succeeded to open the port!
[ros2_control_node-1] Succeeded to change the [1000000] baudrate!
[ros2_control_node-1] [ID:011] Request ping     - Ping succeeded. Dynamixel model number : 1020
[ros2_control_node-1] [ID:012] Request ping     - Ping succeeded. Dynamixel model number : 1020
[ros2_control_node-1] [ID:013] Request ping     - Ping succeeded. Dynamixel model number : 1020
[ros2_control_node-1] [ID:014] Request ping     - Ping succeeded. Dynamixel model number : 1020
[ros2_control_node-1] [ID:015] Request ping     - Ping succeeded. Dynamixel model number : 1020
[ros2_control_node-1] [INFO] [1734430037.814256754] [dynamixel_hardware_interface]: Trying to connect to the communication port...
[ros2_control_node-1] [INFO] [1734430037.814342743] [dynamixel_hardware_interface]: $$$$$ Init Dxl Items
[ros2_control_node-1] [INFO] [1734430037.815966678] [dynamixel_hardware_interface]: [ID:11] item_name:Drive Mode    data:0
[ros2_control_node-1] [INFO] [1734430037.817835061] [dynamixel_hardware_interface]: [ID:11] item_name:Position D Gain    data:100
[ros2_control_node-1] [INFO] [1734430037.818599324] [dynamixel_hardware_interface]: [ID:11] item_name:Position I Gain    data:100
[ros2_control_node-1] [INFO] [1734430037.819848211] [dynamixel_hardware_interface]: [ID:11] item_name:Position P Gain    data:800
[ros2_control_node-1] [INFO] [1734430037.820798634] [dynamixel_hardware_interface]: [ID:12] item_name:Drive Mode    data:0
[ros2_control_node-1] [INFO] [1734430037.821792108] [dynamixel_hardware_interface]: [ID:12] item_name:Position D Gain    data:100
[ros2_control_node-1] [INFO] [1734430037.822778251] [dynamixel_hardware_interface]: [ID:12] item_name:Position I Gain    data:100
[ros2_control_node-1] [INFO] [1734430037.823769777] [dynamixel_hardware_interface]: [ID:12] item_name:Position P Gain    data:800
[ros2_control_node-1] [INFO] [1734430037.824763315] [dynamixel_hardware_interface]: [ID:13] item_name:Drive Mode    data:0
[ros2_control_node-1] [INFO] [1734430037.825754387] [dynamixel_hardware_interface]: [ID:13] item_name:Position D Gain    data:100
[ros2_control_node-1] [INFO] [1734430037.826759409] [dynamixel_hardware_interface]: [ID:13] item_name:Position I Gain    data:100
[ros2_control_node-1] [INFO] [1734430037.827739583] [dynamixel_hardware_interface]: [ID:13] item_name:Position P Gain    data:800
[ros2_control_node-1] [INFO] [1734430037.828729211] [dynamixel_hardware_interface]: [ID:14] item_name:Drive Mode    data:0
[ros2_control_node-1] [INFO] [1734430037.829721548] [dynamixel_hardware_interface]: [ID:14] item_name:Position D Gain    data:100
[ros2_control_node-1] [INFO] [1734430037.830713494] [dynamixel_hardware_interface]: [ID:14] item_name:Position I Gain    data:100
[ros2_control_node-1] [INFO] [1734430037.831705936] [dynamixel_hardware_interface]: [ID:14] item_name:Position P Gain    data:800
[ros2_control_node-1] [INFO] [1734430037.831737148] [dynamixel_hardware_interface]: $$$$$ Init Dxl Read Items
[ros2_control_node-1] Dynamixel Read Type : sync read
[ros2_control_node-1] ID : 11, 12, 13, 14, 15, 
[ros2_control_node-1] Read items :     Present Position    Present Velocity    Present Current    Torque Enable    Present Input Voltage
[ros2_control_node-1] set sync read (indirect addr) : addr 224, size 13
[ros2_control_node-1] Success to set SyncRead handler using indirect address
[ros2_control_node-1] [INFO] [1734430037.903409940] [dynamixel_hardware_interface]: $$$$$ Init Dxl Write Items
[ros2_control_node-1] Dynamixel Write Type : sync write
[ros2_control_node-1] ID : 11, 12, 13, 14, 15, 
[ros2_control_node-1] Write items :     Goal Position
[ros2_control_node-1] set sync write (indirect addr) : addr 634, size 4
[ros2_control_node-1] Success to set SyncWrite handler using indirect address
[ros2_control_node-1] [INFO] [1734430037.943674044] [resource_manager]: Successful initialization of hardware 'OpenManipulatorXSystem'
[ros2_control_node-1] [INFO] [1734430037.944229762] [resource_manager]: 'configure' hardware 'OpenManipulatorXSystem' 
[ros2_control_node-1] [INFO] [1734430037.944240298] [resource_manager]: Successful 'configure' of hardware 'OpenManipulatorXSystem'
[ros2_control_node-1] [INFO] [1734430037.944249963] [resource_manager]: 'activate' hardware 'OpenManipulatorXSystem' 
[ros2_control_node-1] [INFO] [1734430037.947829635] [dynamixel_hardware_interface]: Sync joint state to command (position, -11.8652 <- position, -11.8652
[ros2_control_node-1] [INFO] [1734430037.947864095] [dynamixel_hardware_interface]: Sync joint state to command (position, 3.86908 <- position, 3.86908
[ros2_control_node-1] [INFO] [1734430037.947877511] [dynamixel_hardware_interface]: Sync joint state to command (position, 23.5662 <- position, 23.5662
[ros2_control_node-1] [INFO] [1734430037.947889207] [dynamixel_hardware_interface]: Sync joint state to command (position, 62.4328 <- position, 62.4328
[ros2_control_node-1] [INFO] [1734430037.947900564] [dynamixel_hardware_interface]: Sync joint state to command (position, 0.105769 <- position, 0.105769
[ros2_control_node-1] [INFO] [1734430037.947911529] [dynamixel_hardware_interface]: Sync joint state to command (position, 0 <- position, 0
[spawner-3] [INFO] [1734430038.035130953] [spawner_joint_state_broadcaster]: waiting for service /controller_manager/list_controllers to become available...
[ros2_control_node-1] [ID:011] Torque ON
[ros2_control_node-1] [ID:012] Torque ON
[ros2_control_node-1] [ID:013] Torque ON
[ros2_control_node-1] [ID:014] Torque ON
[ros2_control_node-1] [ID:015] Torque ON
[ros2_control_node-1] [INFO] [1734430038.454864059] [dynamixel_hardware_interface]: Dynamixel Hardware Start!
[ros2_control_node-1] [INFO] [1734430038.455085899] [resource_manager]: Successful 'activate' of hardware 'OpenManipulatorXSystem'
[ros2_control_node-1] [INFO] [1734430038.517477615] [controller_manager]: update rate is 1000 Hz
[ros2_control_node-1] [INFO] [1734430038.517538783] [controller_manager]: Spawning controller_manager RT thread with scheduler priority: 50
[ros2_control_node-1] [WARN] [1734430038.520925487] [controller_manager]: No real-time kernel detected on this system. See [https://control.ros.org/master/doc/ros2_control/controller_manager/doc/userdoc.html] for details on how to enable realtime scheduling.
[ros2_control_node-1] [INFO] [1734430038.538862151] [controller_manager]: Loading controller 'joint_state_broadcaster'
[spawner-3] [INFO] [1734430038.550750441] [spawner_joint_state_broadcaster]: Loaded joint_state_broadcaster
[ros2_control_node-1] [INFO] [1734430038.552067602] [controller_manager]: Configuring controller 'joint_state_broadcaster'
[ros2_control_node-1] [INFO] [1734430038.552144394] [joint_state_broadcaster]: 'joints' or 'interfaces' parameter is empty. All available state interfaces will be published
[spawner-3] [INFO] [1734430038.652058206] [spawner_joint_state_broadcaster]: Configured and activated joint_state_broadcaster
[INFO] [spawner-3]: process has finished cleanly [pid 72621]
[INFO] [spawner-4]: process started with pid [72656]
[INFO] [spawner-5]: process started with pid [72658]
[spawner-4] [INFO] [1734430039.153071779] [spawner_gripper_controller]: waiting for service /controller_manager/list_controllers to become available...
[ros2_control_node-1] [INFO] [1734430039.219485969] [controller_manager]: Loading controller 'arm_controller'
[ros2_control_node-1] [WARN] [1734430039.232599016] [arm_controller]: [Deprecated]: "allow_nonzero_velocity_at_trajectory_end" is set to true. The default behavior will change to false.
[spawner-5] [INFO] [1734430039.249908666] [spawner_arm_controller]: Loaded arm_controller
[ros2_control_node-1] [INFO] [1734430039.333159474] [controller_manager]: Configuring controller 'arm_controller'
[ros2_control_node-1] [INFO] [1734430039.333317685] [arm_controller]: No specific joint names are used for command interfaces. Using 'joints' parameter.
[ros2_control_node-1] [INFO] [1734430039.333336470] [arm_controller]: Command interfaces are [position] and state interfaces are [position velocity].
[ros2_control_node-1] [INFO] [1734430039.333351726] [arm_controller]: Using 'splines' interpolation method.
[ros2_control_node-1] [INFO] [1734430039.334086218] [arm_controller]: Controller state will be published at 200.00 Hz.
[ros2_control_node-1] [INFO] [1734430039.338963022] [arm_controller]: Action status changes will be monitored at 20.00 Hz.
[spawner-5] [INFO] [1734430039.355982317] [spawner_arm_controller]: Configured and activated arm_controller
[ros2_control_node-1] [INFO] [1734430039.405619241] [controller_manager]: Loading controller 'gripper_controller'
[spawner-4] [INFO] [1734430039.418646415] [spawner_gripper_controller]: Loaded gripper_controller
[ros2_control_node-1] [INFO] [1734430039.419885498] [controller_manager]: Configuring controller 'gripper_controller'
[ros2_control_node-1] [INFO] [1734430039.419935887] [gripper_controller]: Action status changes will be monitored at 20Hz.
[spawner-4] [INFO] [1734430039.430912248] [spawner_gripper_controller]: Configured and activated gripper_controller
[INFO] [spawner-5]: process has finished cleanly [pid 72658]
[INFO] [spawner-4]: process has finished cleanly [pid 72656]
  • 打开RViz2可视化界面
$ ros2 launch open_manipulator_x_description model.launch.py

请输入图片描述

  • 查看话题信息
$ ros2 topic list
/arm_controller/controller_state
/arm_controller/joint_trajectory
/arm_controller/state
/arm_controller/transition_event
/clicked_point
/dynamic_joint_states
/dynamixel_hardware_interface/dxl_state
/goal_pose
/gripper_controller/transition_event
/initialpose
/joint_state_broadcaster/transition_event
/joint_states
/parameter_events
/robot_description
/rosout
/tf
/tf_static
  • 查看服务信息
$ ros2 service list
/arm_controller/describe_parameters
/arm_controller/get_parameter_types
/arm_controller/get_parameters
/arm_controller/list_parameters
/arm_controller/query_state
/arm_controller/set_parameters
/arm_controller/set_parameters_atomically
/controller_manager/configure_controller
/controller_manager/describe_parameters
/controller_manager/get_parameter_types
/controller_manager/get_parameters
/controller_manager/list_controller_types
/controller_manager/list_controllers
/controller_manager/list_hardware_components
/controller_manager/list_hardware_interfaces
/controller_manager/list_parameters
/controller_manager/load_controller
/controller_manager/reload_controller_libraries
/controller_manager/set_hardware_component_state
/controller_manager/set_parameters
/controller_manager/set_parameters_atomically
/controller_manager/switch_controller
/controller_manager/unload_controller
/dynamixel_hardware_interface/describe_parameters
/dynamixel_hardware_interface/get_dxl_data
/dynamixel_hardware_interface/get_parameter_types
/dynamixel_hardware_interface/get_parameters
/dynamixel_hardware_interface/list_parameters
/dynamixel_hardware_interface/reboot_dxl
/dynamixel_hardware_interface/set_dxl_data
/dynamixel_hardware_interface/set_dxl_torque
/dynamixel_hardware_interface/set_parameters
/dynamixel_hardware_interface/set_parameters_atomically
/gripper_controller/describe_parameters
/gripper_controller/get_parameter_types
/gripper_controller/get_parameters
/gripper_controller/list_parameters
/gripper_controller/set_parameters
/gripper_controller/set_parameters_atomically
/joint_state_broadcaster/describe_parameters
/joint_state_broadcaster/get_parameter_types
/joint_state_broadcaster/get_parameters
/joint_state_broadcaster/list_parameters
/joint_state_broadcaster/set_parameters
/joint_state_broadcaster/set_parameters_atomically
/joint_state_publisher/describe_parameters
/joint_state_publisher/get_parameter_types
/joint_state_publisher/get_parameters
/joint_state_publisher/list_parameters
/joint_state_publisher/set_parameters
/joint_state_publisher/set_parameters_atomically
/robot_state_publisher/describe_parameters
/robot_state_publisher/get_parameter_types
/robot_state_publisher/get_parameters
/robot_state_publisher/list_parameters
/robot_state_publisher/set_parameters
/robot_state_publisher/set_parameters_atomically
/rviz/describe_parameters
/rviz/get_parameter_types
/rviz/get_parameters
/rviz/list_parameters
/rviz/set_parameters
/rviz/set_parameters_atomically

纠错,疑问,交流: 请进入讨论区点击加入Q群

获取最新文章: 扫一扫右上角的二维码加入“创客智造”公众号


标签: none