What does JointGroupPosition Controller do when it does not have pid gains set?
Hello, Hello,
i am currently trying to simulate the UR3 Robot. Everything works but I am confused that there are no PID gains set in the "armcontrollerur3.yaml" file:
arm_controller:
type: position_controllers/JointTrajectoryController
joints:
- shoulder_pan_joint
- shoulder_lift_joint
- elbow_joint
- wrist_1_joint
- wrist_2_joint
- wrist_3_joint
constraints:
goal_time: 0.6
stopped_velocity_tolerance: 0.05
shoulder_pan_joint: {trajectory: 0.1, goal: 0.1}
shoulder_lift_joint: {trajectory: 0.1, goal: 0.1}
elbow_joint: {trajectory: 0.1, goal: 0.1}
wrist_1_joint: {trajectory: 0.1, goal: 0.1}
wrist_2_joint: {trajectory: 0.1, goal: 0.1}
wrist_3_joint: {trajectory: 0.1, goal: 0.1}
stop_trajectory_duration: 0.5
state_publish_rate: 25
action_monitor_rate: 10
joint_group_position_controller:
type: position_controllers/JointGroupPositionController
joints:
- shoulder_pan_joint
- shoulder_lift_joint
- elbow_joint
- wrist_1_joint
- wrist_2_joint
- wrist_3_joint
I am spawning the jointgroupposition_controller. Gazebo gives the following error when i spawn the model:
[ INFO] [1595405626.600237404, 4443.217000000]: Loading gazebo_ros_control plugin
[ INFO] [1595405626.600315414, 4443.217000000]: Starting gazebo_ros_control plugin in namespace: /
[ERROR] [1595405626.706939033, 4443.217000000]: No p gain specified for pid. Namespace: /gazebo_ros_control/pid_gains/shoulder_pan_joint
[ERROR] [1595405626.708111425, 4443.217000000]: No p gain specified for pid. Namespace: /gazebo_ros_control/pid_gains/shoulder_lift_joint
[ERROR] [1595405626.709094808, 4443.217000000]: No p gain specified for pid. Namespace: /gazebo_ros_control/pid_gains/elbow_joint
[ERROR] [1595405626.710438356, 4443.217000000]: No p gain specified for pid. Namespace: /gazebo_ros_control/pid_gains/wrist_1_joint
[ERROR] [1595405626.711494056, 4443.217000000]: No p gain specified for pid. Namespace: /gazebo_ros_control/pid_gains/wrist_2_joint
[ERROR] [1595405626.712441104, 4443.217000000]: No p gain specified for pid. Namespace: /gazebo_ros_control/pid_gains/wrist_3_joint
The Error makes sense since i don't set any gains.
when I publish to the /jointgroupposition_controller/command to set the joint positions the robot is moving. You can see in the graph below how it is moving when i set the position from 0 to 1.
how does gazebo or ros_control or whoever is behind calculate that?
Thanks!
Asked by val on 2020-07-22 05:51:40 UTC
Answers
If I'm not mistaken, when you don't set gain, the controller use the Gazebo function SetPosition, which "teleport" the link at each timestep. If you set PID value, the controller use the Gazebo function SetForce, which allows a more realistic dynamics simulation.
this is done in this function in default_robot_hw_sim.cpp
Asked by Clément Rolinat on 2020-07-23 10:02:52 UTC
Comments
Thanks for the answer! That is what I found out too actually....But know I am wondering why it takes 0.4 secs to get to the position. (see in the graph) My max step size is set to 0,001... so it should be set after 0.001 secs isnt that right? It would make sense if the time in the rqt_graph is not equal the simulation time...But use_sim_time is set to true... Do you know more about that?
Asked by val on 2020-07-27 07:27:04 UTC
I think it is the JointTrajectoryController that create a smooth trajectory by extrapolation and then send joints position command to JointGroupPositionController. But you said that you directly published to /joint_group_position_controller/command, without using JointTrajectoryController, so I don't know !
Asked by Clément Rolinat on 2020-08-17 08:10:45 UTC
Comments