< >
Home » ROS2与Interbotix系列机械臂教程 » ROS2与Interbotix系列机械臂教程-记录与复现轨迹

ROS2与Interbotix系列机械臂教程-记录与复现轨迹

文章说明

  • 本教程主要介绍如何在ros2环境下运行记录与复现轨迹例程

操作步骤

  • 启动机械臂,假设当前使用的是wx250s机械臂
$ ros2 launch interbotix_xsarm_puppet xsarm_puppet_single.launch.py robot_model:=wx250s record_or_playback:=record
  • 节点启动完成后,手动操纵臂和夹具,完成所需的动作
  • 完成后,将机器人返回到其初始起始位置并Ctrl+C节点,以便 rosbag 停止录制
  • 默认情况下,bag文件将保存在bag目录中
  • 执行回放程序
$ ros2 launch interbotix_xsarm_puppet xsarm_puppet_single.launch.py robot_model:=wx250s record_or_playback:=playback

如果您指定了自定义包文件名,请确保在上述命令中也包含该名称。当包文件播放完毕后,您可以通过导航到包文件所在的目录并在终端中键入以下内容来重新启动它:

$ ros2 bag play </path/to/bag>
  • 机器人现在应该重复这些动作。完成后,按Ctrl+C停止所有节点

  • 要查看xsarm_puppet_single.launch.py​​文件的其他命令行参数,请参阅下表

Argument Description Default Choices
robot_model model type of the Interbotix Arm such as wx200 or rx150.   px100, px150, rx150, rx200, wx200, wx250, wx250s, vx250, vx300, vx300s, mobile_px100, mobile_wx200, mobile_wx250s, aloha_wx250s, aloha_vx300s
robot_name name of the robot (typically equal to robot_model, but could be anything). LaunchConfig(robot_model)  
use_rviz launches RViz if set to true. true true, false
record_or_playback ‘record’ to record joint commands while physically manipulating the arm to a bagfile or ‘playback’ to play-back joint commands from a bagfile to a torqued on arm.   record, playback
bag_name Desired ROS bag file name. LaunchConfig(robot_name) + ‘_commands’  
launch_driver true if xsarm_control should be launched - set to false if you would like to run your own version of this file separately. true true, false
xs_driver_logging_level set the logging level of the X-Series Driver. INFO DEBUG, INFO, WARN, ERROR, FATAL
use_sim if true, the DYNAMIXEL simulator node is run; use RViz to visualize the robot’s motion; if false, the real DYNAMIXEL driver node is run. false true, false
base_link_frame name of the ‘root’ link on the arm; typically base_link, but can be changed if attaching the arm to a mobile base that already has a base_link frame. base_link  
use_gripper if true, the default gripper is included in the robot_description; if false, it is left out; set to false if not using the default gripper. true true, false
show_ar_tag if true, the AR tag mount is included in the robot_description; if false, it is left out; set to true if using the AR tag mount in your project. false true, false
show_gripper_bar if true, the gripper_bar link is included in the robot_description; if false, the gripper_bar and finger links are not loaded. Set to false if you have a custom gripper attachment. true true, false
show_gripper_fingers if true, the gripper fingers are included in the robot_description; if false, the gripper finger links are not loaded. Set to false if you have custom gripper fingers. true true, false
use_world_frame set this to true if you would like to load a ‘world’ frame to the robot_description which is located exactly at the ‘base_link’ frame of the robot; if using multiple robots or if you would like to attach the ‘base_link’ frame of the robot to a different frame, set this to false. true true, false
external_urdf_loc the file path to the custom urdf.xacro file that you would like to include in the Interbotix robot’s urdf.xacro file. ‘’  
hardware_type configures the robot_description to use the actual hardware, fake hardware, or hardware simulated in Gazebo. actual actual, fake, gz_classic
robot_description URDF of the robot; this is typically generated by the xacro command. Command(FindExec(xacro) + ‘ ‘ + LocalVar(‘FindPackageShare(pkg= interbotix_xsarm_descriptions) + ‘urdf’ + LaunchConfig(robot_model)’) + ‘.urdf.xacro ‘ + ‘robot_name:=’ + LaunchConfig(robot_name) + ‘ ‘ + ‘base_link_frame:=’ + LaunchConfig(base_link_frame) + ‘ ‘ + ‘use_gripper:=’ + LaunchConfig(use_gripper) + ‘ ‘ + ‘show_ar_tag:=’ + LaunchConfig(show_ar_tag) + ‘ ‘ + ‘show_gripper_bar:=’ + LaunchConfig(show_gripper_bar) + ‘ ‘ + ‘show_gripper_fingers:=’ + LaunchConfig(show_gripper_fingers) + ‘ ‘ + ‘use_world_frame:=’ + LaunchConfig(use_world_frame) + ‘ ‘ + ‘external_urdf_loc:=’ + LaunchConfig(external_urdf_loc) + ‘ ‘ + ‘hardware_type:=’ + LaunchConfig(hardware_type) + ‘ ‘)  

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

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


标签: none