< >
Home » ROS1与Interbotix系列机械臂教程 » ROS1与Interbotix系列机械臂教程-仿真-gazebo中加载机械臂模型

ROS1与Interbotix系列机械臂教程-仿真-gazebo中加载机械臂模型

文章说明

  • 本文主要介绍如何在gazebo中加载机械臂模型且进行简单控制

操作步骤

  • 启动gezebo且加载wx250s的模型
$ roslaunch interbotix_xsarm_gazebo xsarm_gazebo.launch robot_model:=wx250s use_trajectory_controllers:=true
... logging to /home/ubuntu/.ros/log/12640804-ba91-11ee-8924-a34d25c11ce2/roslaunch-TB3-R12V302-VM-4073.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://localhost:40463/

SUMMARY
========

PARAMETERS
 * /gazebo/enable_ros_network: True
 * /rosdistro: noetic
 * /rosversion: 1.16.0
 * /use_sim_time: True
 * /wx250s/arm_controller/constraints/elbow/goal: 0.2
 * /wx250s/arm_controller/constraints/elbow/trajectory: 0.2
 * /wx250s/arm_controller/constraints/forearm_roll/goal: 0.2
 * /wx250s/arm_controller/constraints/forearm_roll/trajectory: 0.2
 * /wx250s/arm_controller/constraints/goal_time: 0.2
 * /wx250s/arm_controller/constraints/shoulder/goal: 0.2
 * /wx250s/arm_controller/constraints/shoulder/trajectory: 0.2
 * /wx250s/arm_controller/constraints/waist/goal: 0.1
 * /wx250s/arm_controller/constraints/waist/trajectory: 0.2
 * /wx250s/arm_controller/constraints/wrist_angle/goal: 0.2
 * /wx250s/arm_controller/constraints/wrist_angle/trajectory: 0.2
 * /wx250s/arm_controller/constraints/wrist_rotate/goal: 0.2
 * /wx250s/arm_controller/constraints/wrist_rotate/trajectory: 0.2
 * /wx250s/arm_controller/gains/elbow/d: 1.0
 * /wx250s/arm_controller/gains/elbow/i: 10.0
 * /wx250s/arm_controller/gains/elbow/p: 300.0
 * /wx250s/arm_controller/gains/forearm_roll/d: 0
 * /wx250s/arm_controller/gains/forearm_roll/i: 0
 * /wx250s/arm_controller/gains/forearm_roll/p: 5.0
 * /wx250s/arm_controller/gains/shoulder/d: 1.0
 * /wx250s/arm_controller/gains/shoulder/i: 10.0
 * /wx250s/arm_controller/gains/shoulder/p: 500.0
 * /wx250s/arm_controller/gains/waist/d: 1.0
 * /wx250s/arm_controller/gains/waist/i: 5.0
 * /wx250s/arm_controller/gains/waist/p: 100.0
 * /wx250s/arm_controller/gains/wrist_angle/d: 1.0
 * /wx250s/arm_controller/gains/wrist_angle/i: 3.0
 * /wx250s/arm_controller/gains/wrist_angle/p: 100.0
 * /wx250s/arm_controller/gains/wrist_rotate/d: 0.1
 * /wx250s/arm_controller/gains/wrist_rotate/i: 1.0
 * /wx250s/arm_controller/gains/wrist_rotate/p: 100.0
 * /wx250s/arm_controller/joints: ['waist', 'should...
 * /wx250s/arm_controller/type: effort_controller...
 * /wx250s/gripper_controller/gains/left_finger/d: 1.0
 * /wx250s/gripper_controller/gains/left_finger/i: 0.0
 * /wx250s/gripper_controller/gains/left_finger/p: 100.0
 * /wx250s/gripper_controller/gains/right_finger/d: 1.0
 * /wx250s/gripper_controller/gains/right_finger/i: 0.0
 * /wx250s/gripper_controller/gains/right_finger/p: 100.0
 * /wx250s/gripper_controller/joints: ['left_finger', '...
 * /wx250s/gripper_controller/type: effort_controller...
 * /wx250s/joint_state_controller/publish_rate: 100
 * /wx250s/joint_state_controller/type: joint_state_contr...
 * /wx250s/robot_description: <?xml version="1....

NODES
  /
    gazebo (gazebo_ros/gzserver)
    gazebo_gui (gazebo_ros/gzclient)
  /wx250s/
    controller_spawner (controller_manager/controller_manager)
    robot_state_publisher (robot_state_publisher/robot_state_publisher)
    urdf_spawner (gazebo_ros/spawn_model)

auto-starting new master
process[master]: started with pid [4083]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to 12640804-ba91-11ee-8924-a34d25c11ce2
process[rosout-1]: started with pid [4093]
started core service [/rosout]
process[gazebo-2]: started with pid [4100]
process[gazebo_gui-3]: started with pid [4104]
process[wx250s/controller_spawner-4]: started with pid [4108]
process[wx250s/robot_state_publisher-5]: started with pid [4111]
process[wx250s/urdf_spawner-6]: started with pid [4112]
[INFO] [1706084274.996894, 0.000000]: Loading model XML from ros parameter robot_description
[INFO] [1706084275.001909, 0.000000]: Waiting for service /gazebo/spawn_urdf_model
[ INFO] [1706084275.152660056]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1706084275.153739981]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...
[ INFO] [1706084275.236308067]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1706084275.237972139]: waitForService: Service [/gazebo_gui/set_physics_properties] has not been advertised, waiting...
[ INFO] [1706084276.178432234]: waitForService: Service [/gazebo/set_physics_properties] is now available.
[ INFO] [1706084276.196571156]: Physics dynamic reconfigure ready.
[INFO] [1706084276.209107, 0.000000]: Calling service /gazebo/spawn_urdf_model
[INFO] [1706084276.492312, 0.000000]: Spawn status: SpawnModel: Successfully spawned entity
[ INFO] [1706084276.539026814]: Loading gazebo_ros_control plugin
[ INFO] [1706084276.539162702]: Starting gazebo_ros_control plugin in namespace: /wx250s/
[ INFO] [1706084276.539635711]: gazebo_ros_control plugin is waiting for model URDF in parameter [/wx250s/robot_description] on the ROS param server.
[ INFO] [1706084276.662582581]: Loaded gazebo_ros_control.
Loaded 'arm_controller'
Loaded 'gripper_controller'
Loaded 'joint_state_controller'
[wx250s/urdf_spawner-6] process has finished cleanly
log file: /home/ubuntu/.ros/log/12640804-ba91-11ee-8924-a34d25c11ce2/wx250s-urdf_spawner-6*.log

请输入图片描述

  • 参数说明

请输入图片描述

  • 默认情况下,gazebo处于暂停状态,需要输入以下命令来启动,或者点击gazebo界面左下方的播放按钮
$ rosservice call /gazebo/unpause_physics
  • 查看话题
$ rostopic list 
/clock
/gazebo/link_states
/gazebo/model_states
/gazebo/parameter_descriptions
/gazebo/parameter_updates
/gazebo/performance_metrics
/gazebo/set_link_state
/gazebo/set_model_state
/rosout
/rosout_agg
/tf
/tf_static
/wx250s/arm_controller/command
/wx250s/arm_controller/follow_joint_trajectory/cancel
/wx250s/arm_controller/follow_joint_trajectory/feedback
/wx250s/arm_controller/follow_joint_trajectory/goal
/wx250s/arm_controller/follow_joint_trajectory/result
/wx250s/arm_controller/follow_joint_trajectory/status
/wx250s/arm_controller/gains/elbow/parameter_descriptions
/wx250s/arm_controller/gains/elbow/parameter_updates
/wx250s/arm_controller/gains/forearm_roll/parameter_descriptions
/wx250s/arm_controller/gains/forearm_roll/parameter_updates
/wx250s/arm_controller/gains/shoulder/parameter_descriptions
/wx250s/arm_controller/gains/shoulder/parameter_updates
/wx250s/arm_controller/gains/waist/parameter_descriptions
/wx250s/arm_controller/gains/waist/parameter_updates
/wx250s/arm_controller/gains/wrist_angle/parameter_descriptions
/wx250s/arm_controller/gains/wrist_angle/parameter_updates
/wx250s/arm_controller/gains/wrist_rotate/parameter_descriptions
/wx250s/arm_controller/gains/wrist_rotate/parameter_updates
/wx250s/arm_controller/state
/wx250s/gripper_controller/command
/wx250s/gripper_controller/follow_joint_trajectory/cancel
/wx250s/gripper_controller/follow_joint_trajectory/feedback
/wx250s/gripper_controller/follow_joint_trajectory/goal
/wx250s/gripper_controller/follow_joint_trajectory/result
/wx250s/gripper_controller/follow_joint_trajectory/status
/wx250s/gripper_controller/gains/left_finger/parameter_descriptions
/wx250s/gripper_controller/gains/left_finger/parameter_updates
/wx250s/gripper_controller/gains/right_finger/parameter_descriptions
/wx250s/gripper_controller/gains/right_finger/parameter_updates
/wx250s/gripper_controller/state
/wx250s/joint_states

通过话题进行简单控制

$ rostopic pub -1 /

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

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


标签: ros1与interbotix系列机械臂教程