< >
Home » ROS2与Interbotix系列机械臂教程 » ROS2与Interbotix系列机械臂教程-moveit上使用gui控制

ROS2与Interbotix系列机械臂教程-moveit上使用gui控制

文章说明

  • 本教程主要介绍如何在ros2环境下moveit上使用gui控制机械臂

操作步骤

  • 假设正在现实中使用WidowX-250s机械臂,运行该命令
$ ros2 launch interbotix_xsarm_moveit_interface xsarm_moveit_interface.launch.py robot_model:=wx250s
  • moveit启动成功之后,会弹出一个gui窗口

请输入图片描述

  • 可以通过调整gui中滑块来指定夹具的位置和方向

    • Plan Pose - MoveIt尝试规划夹具移动所需位置和方向的轨迹
    • Plan Position - MoveIt尝试规划夹具移动所需位置的轨迹,忽略具体方向
    • Plan Orientation -MoveIt尝试规划夹具移动所需方向的轨迹,忽略具体位置
    • Execute - 执行规划到的轨迹
    • Reset - 重置gui中的所有参数值为0

请输入图片描述

有时候MoveIt会出现无法成功有效轨迹的情况。其主要有两个可能:一是机械臂无法在物理上到达所需的位置,二是MoveIt生成的随机轨迹是不能执行的。如果很明显该位置在物理上可以到达,请多点击按钮重新规划轨迹

指定位置和方向先比较于仅是指定位置时,那找到有效的轨迹要困难得多,特别是对于较低自由度的机械臂

  • 通过下面列表,可更一步了解启动文件的其他参数
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
robot_name name of the robot (typically equal to robot_model, but could be anything). LaunchConfig(robot_model)  
external_srdf_loc the file path to the custom semantic description file that you would like to include in the Interbotix robot’s semantic description. ‘’  
mode_configs the file path to the ‘mode config’ YAML file. LocalVar(‘FindPackageShare(pkg= interbotix_xsarm_moveit_interface) + ‘config’ + ‘modes.yaml’’)  
use_moveit_rviz launches RViz with MoveIt’s RViz configuration. true true, false
rviz_frame defines the fixed frame parameter in RViz. Note that if use_world_frame is false, this parameter should be changed to a frame that exists. world  
rviz_config_file file path to the config file RViz should load. LocalVar(‘FindPackageShare(pkg= interbotix_xsarm_moveit_interface) + ‘rviz’ + ‘xsarm_moveit_interface.rviz’’)  
world_filepath the file path to the Gazebo ‘world’ file to load. LocalVar(‘FindPackageShare(pkg= interbotix_common_sim) + ‘worlds’ + ‘interbotix.world’’)  
moveit_interface_type if ‘cpp’, launches the custom moveit_interface C++ API node; if ‘python’, launch the Python Interface tutorial node; only the cpp option is currently supported. cpp cpp,
use_moveit_interface_gui launch a custom GUI to interface with the moveit_interface node so that the user can command specific end-effector poses (defined by ‘ee_gripper_link’). true true, false
use_sim_time tells ROS nodes asking for time to get the Gazebo-published simulation time, published over the ROS topic /clock; this value is automatically set to ‘true’ if using Gazebo hardware. 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 parameter; 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 parameter; 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 parameter; 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 parameter; 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 parameter 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 parameter 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