I want to move the robot only in the X-direction. I gave velocity 10 units in x-direction, but it caused the robot to move in all three direction (slight movement of less than 2cm, but I need very accurate movements). Is there something we can do to solve this.
Only x position of the end effector should be changed
All x,y,z,r,p,y of the end effector was changed. (Apart from x, the changes in all other directions is less than 2cm, but our application requires very accurate movements)
Thanks for reporting an issue. Because we're a volunteer community, providing a pull request with suggested changes is always welcomed.
My first thought is that twist.linear.x of 10 m/s is probably too fast. I guess the algorithm is throttling the joint speeds because it is too fast, and that causes some inaccuracy.
Is there a chance the robot is starting near a singularity? Accuracy won't be great near singularities.
What kind of robot is it? How many degrees of freedom? Can you post the servo_settings.yaml file you're using?
Thank you for the reply. The settings file is below
use_gazebo: true # Whether the robot is started in a Gazebo simulation environment
robot_link_command_frame: world
command_in_type: "speed_units"
scale:
linear: 0.6
rotational: 0.3
joint: 0.01
low_pass_filter_coeff: 2.
publish_period: 0.008 # 1/Nominal publish rate [seconds]
command_out_type: std_msgs/Float64MultiArray
publish_joint_positions: true
publish_joint_velocities: false
publish_joint_accelerations: false
move_group_name: arm
planning_frame: world
incoming_command_timeout: 0.1
num_outgoing_halt_msgs_to_publish: 4
lower_singularity_threshold: 17
hard_stop_singularity_threshold: 30
joint_limit_margin: 0.1
cartesian_command_in_topic: servo_server/delta_twist_cmds
joint_command_in_topic: servo_server/delta_joint_cmds
joint_topic: joint_states
status_topic: servo_server/status
command_out_topic: joint_group_position_controller/command
check_collisions: true
collision_check_rate: 50
collision_check_type: threshold_distance
self_collision_proximity_threshold: 0.001
scene_collision_proximity_threshold: 0.005
collision_distance_safety_factor: 1000
min_allowable_collision_distance: 0.001
The robot is a modified version of ur5.
Just to add a question. If I want to move the robot +0.2m in the +x direction, what value should be given to twist.linear.x? I'm a bit confused on how the twist message is converted to position.
Thank You :)
My first thought is that twist.linear.x of 10 m/s is probably too fast. I guess the algorithm is throttling the joint speeds because it is too fast, and that causes some inaccuracy.
Is there a chance the robot is starting near a singularity? Accuracy won't be great near singularities.
What kind of robot is it? How many degrees of freedom? Can you post the servo_settings.yaml file you're using?
Just to add a question. If I want to move the robot +0.2m in the +x direction, what value should be given to twist.linear.x? I'm a bit confused on how the twist message is converted to position.
Ah, there's the fundamental problem. Twist is a velocity command. Servo doesn't really handle position commands yet, so there's no easy way to send it to a certain position.
This PR adds position-tracking functionality. I think it might get merged soon. There's an example in src/cpp_interface_example/pose_tracking_example.cpp
pose_tracking_example.cpp
Couldn'nt find the pose_tracking_example.cpp file, could you please share the link?