Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[QUESTION] Configuration for servoing #1231

Open
PietroValerio opened this issue Jan 13, 2025 · 1 comment
Open

[QUESTION] Configuration for servoing #1231

PietroValerio opened this issue Jan 13, 2025 · 1 comment

Comments

@PietroValerio
Copy link

Hi i'm investigating why i get [scaled_joint_trajectory_controller]: Holding position due to state tolerance violation, when i do servoing via moveit cpp api, i should note that the code that gives this message also worked without flaws on real ur10e. It could be only a moveit problem but, it's only a configuration problem from my side.
I'm using your driver picked by source tag 2.4.13 (the code tested was tested using the binary version 2.4.13 which is no longer available), and I followed the tutorial to build a cell with ur.
You say that for servoing is reccomended to use either /forward_position_controller/commands or /forward_velocity_controller/commands. I noted that with the new moveit api you could use /scaled_joint_trajectory_controller/joint_trajectory for servoing (this was working with the binary version of the driver). Using the compiled version of the driver gave [scaled_joint_trajectory_controller]: Holding position due to state tolerance violation. I tried to modify the ros2_controllers.yaml file in particular the costraints and I saw the robot moving so my question is, are there some values that are the best for the configuration? I also want to note that for jazzy, atleast, you are using an older version of ur_servo.yaml, some parameters are changed, you can find here the complete list.
This is my ros2_control.yaml file

controller_manager:
  ros__parameters:
    joint_state_broadcaster:
      type: joint_state_broadcaster/JointStateBroadcaster

    gripper_position_controller:
      type: position_controllers/GripperActionController

    io_and_status_controller:
      type: ur_controllers/GPIOController

    speed_scaling_state_broadcaster:
      type: ur_controllers/SpeedScalingStateBroadcaster

    force_torque_sensor_broadcaster:
      type: force_torque_sensor_broadcaster/ForceTorqueSensorBroadcaster

    joint_trajectory_controller:
      type: joint_trajectory_controller/JointTrajectoryController

    scaled_joint_trajectory_controller:
      type: ur_controllers/ScaledJointTrajectoryController

    forward_velocity_controller:
      type: velocity_controllers/JointGroupVelocityController

    forward_position_controller:
      type: position_controllers/JointGroupPositionController

    force_mode_controller:
      type: ur_controllers/ForceModeController

    freedrive_mode_controller:
      type: ur_controllers/FreedriveModeController

    passthrough_trajectory_controller:
      type: ur_controllers/PassthroughTrajectoryController

    tcp_pose_broadcaster:
      type: pose_broadcaster/PoseBroadcaster

    ur_configuration_controller:
      type: ur_controllers/URConfigurationController

speed_scaling_state_broadcaster:
  ros__parameters:
    state_publish_rate: 100.0
    tf_prefix: "ur10e_"

io_and_status_controller:
  ros__parameters:
    tf_prefix: "ur10e_"

ur_configuration_controller:
  ros__parameters:
    tf_prefix: "ur10e_"

force_torque_sensor_broadcaster:
  ros__parameters:
    sensor_name: ur10e_tcp_fts_sensor
    state_interface_names:
      - force.x
      - force.y
      - force.z
      - torque.x
      - torque.y
      - torque.z
    frame_id: ur10e_tool0
    topic_name: ft_data

joint_trajectory_controller:
  ros__parameters:
    joints:
      - ur10e_shoulder_pan_joint
      - ur10e_shoulder_lift_joint
      - ur10e_elbow_joint
      - ur10e_wrist_1_joint
      - ur10e_wrist_2_joint
      - ur10e_wrist_3_joint
    command_interfaces:
      - position
    state_interfaces:
      - position
      - velocity
    state_publish_rate: 100.0
    action_monitor_rate: 20.0
    allow_partial_joints_goal: false
    constraints:
      stopped_velocity_tolerance: 0.2
      goal_time: 0.0
      ur10e_shoulder_pan_joint: { trajectory: 0.2, goal: 0.1 }
      ur10e_shoulder_lift_joint: { trajectory: 0.2, goal: 0.1 }
      ur10e_elbow_joint: { trajectory: 0.2, goal: 0.1 }
      ur10e_wrist_1_joint: { trajectory: 0.2, goal: 0.1 }
      ur10e_wrist_2_joint: { trajectory: 0.2, goal: 0.1 }
      ur10e_wrist_3_joint: { trajectory: 0.2, goal: 0.1 }

scaled_joint_trajectory_controller:
  ros__parameters:
    joints:
      - ur10e_shoulder_pan_joint
      - ur10e_shoulder_lift_joint
      - ur10e_elbow_joint
      - ur10e_wrist_1_joint
      - ur10e_wrist_2_joint
      - ur10e_wrist_3_joint
    command_interfaces:
      - position
    state_interfaces:
      - position
      - velocity
    state_publish_rate: 100.0
    action_monitor_rate: 20.0
    allow_partial_joints_goal: false
    constraints:
      stopped_velocity_tolerance: 0.2
      goal_time: 0.0
      ur10e_shoulder_pan_joint: { trajectory: 0.2, goal: 0.1 } # putting higher values make the robot move without warning
      ur10e_shoulder_lift_joint: { trajectory: 0.2, goal: 0.1 }  # putting higher values make the robot move without warning
      ur10e_elbow_joint: { trajectory: 0.2, goal: 0.1 }  # putting higher values make the robot move without warning
      ur10e_wrist_1_joint: { trajectory: 0.2, goal: 0.1 } # putting higher values make the robot move without warning
      ur10e_wrist_2_joint: { trajectory: 0.2, goal: 0.1 }  # putting higher values make the robot move without warning
      ur10e_wrist_3_joint: { trajectory: 0.2, goal: 0.1 }  # putting higher values make the robot move without warning
    speed_scaling_interface_name: ur10e_speed_scaling/speed_scaling_factor

passthrough_trajectory_controller:
  ros__parameters:
    tf_prefix: "ur10e_"
    joints:
      - ur10e_shoulder_pan_joint
      - ur10e_shoulder_lift_joint
      - ur10e_elbow_joint
      - ur10e_wrist_1_joint
      - ur10e_wrist_2_joint
      - ur10e_wrist_3_joint
    state_interfaces:
      - position
      - velocity
    speed_scaling_interface_name: ur10e_speed_scaling/speed_scaling_factor

forward_velocity_controller:
  ros__parameters:
    joints:
      - ur10e_shoulder_pan_joint
      - ur10e_shoulder_lift_joint
      - ur10e_elbow_joint
      - ur10e_wrist_1_joint
      - ur10e_wrist_2_joint
      - ur10e_wrist_3_joint
    interface_name: velocity

forward_position_controller:
  ros__parameters:
    joints:
      - ur10e_shoulder_pan_joint
      - ur10e_shoulder_lift_joint
      - ur10e_elbow_joint
      - ur10e_wrist_1_joint
      - ur10e_wrist_2_joint
      - ur10e_wrist_3_joint

force_mode_controller:
  ros__parameters:
    tf_prefix: "ur10e_"

freedrive_mode_controller:
  ros__parameters:
    tf_prefix: "ur10e_"

tcp_pose_broadcaster:
  ros__parameters:
    frame_id: ur10e_base
    pose_name: ur10e_tcp_pose
    tf:
      child_frame_id: ur10e_tool0_controller

gripper_position_controller:
  ros__parameters:
    action_monitor_rate: 100.0
    joint: "gripper_finger_joint"
    allow_stalling: false
    goal_tolerance: 0.01
    max_effort: 0.0
    stall_timeout: 1.0
    stall_velocity_threshold: 0.001

Thanks in advance for your awnsers

@urfeex
Copy link
Member

urfeex commented Jan 14, 2025

Could you please provide a minimum working example so that we could reproduce the problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants