Skip to content

Commit ed48e29

Browse files
committed
Update moveit_servo tutorial to release 1.3.x of UR5
1 parent 367aa19 commit ed48e29

File tree

2 files changed

+73
-5
lines changed

2 files changed

+73
-5
lines changed

doc/realtime_servo/realtime_servo_tutorial.rst

+5-5
Original file line numberDiff line numberDiff line change
@@ -38,25 +38,25 @@ Re-build and re-source the workspace. ::
3838

3939
Launch the Gazebo simulation: ::
4040

41-
roslaunch ur_gazebo ur5.launch
41+
roslaunch ur_gazebo ur5_bringup.launch
4242

43-
roslaunch ur5_moveit_config ur5_moveit_planning_execution.launch sim:=true
43+
roslaunch ur5_moveit_config moveit_planning_execution.launch sim:=true
4444

45-
roslaunch ur5_moveit_config moveit_rviz.launch config:=true
45+
roslaunch ur5_moveit_config moveit_rviz.launch
4646

4747
In RViz, grab the red/blue/green "interactive marker" and drag the robot to a non-singular position (not all zero joint angles) that is not close to a joint limit. Click "plan and execute" to move the robot to that pose.
4848

4949
Switch to a compatible type of `ros-control` controller. It should be a `JointGroupVelocityController` or a `JointGroupPositionController`, not a trajectory controller like MoveIt usually requires. ::
5050

5151
rosservice call /controller_manager/switch_controller "start_controllers: ['joint_group_position_controller']
52-
stop_controllers: ['arm_controller']
52+
stop_controllers: ['eff_joint_traj_controller']
5353
strictness: 0
5454
start_asap: false
5555
timeout: 0.0"
5656

5757
Launch the servo node. This example uses commands from a `SpaceNavigator <https://www.3dconnexion.com/spacemouse_compact/en/>`_ joystick-like device: ::
5858

59-
roslaunch moveit_servo spacenav_cpp.launch
59+
roslaunch moveit_servo spacenav_cpp.launch config:=$(rospack find moveit_tutorials)/doc/realtime_servo/ur_config.yaml
6060

6161
If you do not have a SpaceNav 3D mouse, you can publish example servo commands from the command line with: ::
6262

doc/realtime_servo/ur_config.yaml

+68
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
###############################################
2+
# Modify all parameters related to servoing here
3+
###############################################
4+
use_gazebo: true # Whether the robot is started in a Gazebo simulation environment
5+
6+
## Properties of incoming commands
7+
command_in_type: "speed_units" # "unitless"> in the range [-1:1], as if from joystick. "speed_units"> cmds are in m/s and rad/s
8+
scale:
9+
# Scale parameters are only used if command_in_type=="unitless"
10+
linear: 0.6 # Max linear velocity. Meters per publish_period. Unit is [m/s]. Only used for Cartesian commands.
11+
rotational: 0.3 # Max angular velocity. Rads per publish_period. Unit is [rad/s]. Only used for Cartesian commands.
12+
# Max joint angular/linear velocity. Rads or Meters per publish period. Only used for joint commands on joint_command_in_topic.
13+
joint: 0.01
14+
low_pass_filter_coeff: 2. # Larger --> trust the filtered data more, trust the measurements less.
15+
16+
## Properties of outgoing commands
17+
publish_period: 0.008 # 1/Nominal publish rate [seconds]
18+
low_latency_mode: false # Set this to true to publish as soon as an incoming Twist command is received (publish_period is ignored)
19+
20+
# What type of topic does your robot driver expect?
21+
# Currently supported are std_msgs/Float64MultiArray (for ros_control JointGroupVelocityController or JointGroupPositionController)
22+
# or trajectory_msgs/JointTrajectory (for Universal Robots and other non-ros_control robots)
23+
command_out_type: std_msgs/Float64MultiArray
24+
25+
# What to publish? Can save some bandwidth as most robots only require positions or velocities
26+
publish_joint_positions: true
27+
publish_joint_velocities: false
28+
publish_joint_accelerations: false
29+
30+
## MoveIt properties
31+
move_group_name: manipulator # Often 'manipulator' or 'arm'
32+
planning_frame: world # The MoveIt planning frame. Often 'base_link' or 'world'
33+
34+
## Other frames
35+
ee_frame_name: tool0 # The name of the end effector link, used to return the EE pose
36+
robot_link_command_frame: world # commands must be given in the frame of a robot link. Usually either the base or end effector
37+
38+
## Stopping behaviour
39+
incoming_command_timeout: 0.1 # Stop servoing if X seconds elapse without a new command
40+
# If 0, republish commands forever even if the robot is stationary. Otherwise, specify num. to publish.
41+
# Important because ROS may drop some messages and we need the robot to halt reliably.
42+
num_outgoing_halt_msgs_to_publish: 4
43+
44+
## Configure handling of singularities and joint limits
45+
lower_singularity_threshold: 17 # Start decelerating when the condition number hits this (close to singularity)
46+
hard_stop_singularity_threshold: 30 # Stop when the condition number hits this
47+
joint_limit_margin: 0.1 # added as a buffer to joint limits [radians]. If moving quickly, make this larger.
48+
49+
## Topic names
50+
cartesian_command_in_topic: delta_twist_cmds # Topic for incoming Cartesian twist commands
51+
joint_command_in_topic: delta_joint_cmds # Topic for incoming joint angle commands
52+
joint_topic: joint_states
53+
status_topic: status # Publish status to this topic
54+
command_out_topic: /joint_group_position_controller/command # Publish outgoing commands here
55+
56+
## Collision checking for the entire robot body
57+
check_collisions: true # Check collisions?
58+
collision_check_rate: 50 # [Hz] Collision-checking can easily bog down a CPU if done too often.
59+
# Two collision check algorithms are available:
60+
# "threshold_distance" begins slowing down when nearer than a specified distance. Good if you want to tune collision thresholds manually.
61+
# "stop_distance" stops if a collision is nearer than the worst-case stopping distance and the distance is decreasing. Requires joint acceleration limits
62+
collision_check_type: threshold_distance
63+
# Parameters for "threshold_distance"-type collision checking
64+
self_collision_proximity_threshold: 0.01 # Start decelerating when a self-collision is this far [m]
65+
scene_collision_proximity_threshold: 0.05 # Start decelerating when a scene collision is this far [m]
66+
# Parameters for "stop_distance"-type collision checking
67+
collision_distance_safety_factor: 1000 # Must be >= 1. A large safety factor is recommended to account for latency
68+
min_allowable_collision_distance: 0.01 # Stop if a collision is closer than this [m]

0 commit comments

Comments
 (0)