Hey all,
So I am trying to use the effort_controller/JointVelocityController as a controller to interface with movegroup action service. In my urdf file I made sure to set the hardware interface to VelocityJointInterface, and when creating my RobotHW class I made sure to create a private variable hardware_interface::EffortJointInterface jnt_vel_interface; in order to register and connect the interface. Here is my controller.yaml file
--
You received this message because you are subscribed to the Google Groups "ROS/Orocos Robot Control Special Interest Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ros-sig-robot-co...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to ros-sig-robot-control+unsub...@googlegroups.com.
I am also working with the effort_controller/JointVelocityController.
We are currently trying to figure out good PID gains for a 7DoF robot arm. I will post our experiences here, once we are done.
I just have a few questions:
- Isn't the effort_controller/JointVelocityController a single joint controller? Thus only capable of having one joint being set in the joint tag?
- What we are currently trying to do is figure out good PIDs for each revolute joint separately (separate controllers with separate yaml files) by making all but the current joint a fixed joint in the URDF.
- Another thing that we recognized is that the JointVelocityController only publishes state information only every 10th time update() is called (https://github.com/ros-controls/ros_controllers/blob/indigo-devel/effort_controllers/src/joint_velocity_controller.cpp#L140). For our initial PIDs the rqt_plots looked quite ok/smooth, but the arm kept dropping and was totally unstable. When I then published to the state topic every update(), I found the controller heavily oscillating changing sign every message. By only publishing every even message, you did not see this...;-)
- Now we are trying to find the PIDs using Ziegler-Nichols strategy for each joint controller separately and then hope that it still works when me make all joints revolute again. Would you say this approach is feasible? Are there any other suggestions?
To unsubscribe from this group and stop receiving emails from it, send an email to ros-sig-robot-co...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to ros-sig-robot-control+unsubscri...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "ROS/Orocos Robot Control Special Interest Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ros-sig-robot-control+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Thanks for the comments,
it seems that we are able to find (more or less) good/satisfying PIDs for all separate joint respectively following the approach mentioned above.
However, as soon as we allow several joints to be revolute again at the same time, The behaviour is bad again - as Adolfo already expected for the obvious reasons.
We again see highly oscillating values in the joint controllers changing the sign evey update cycle.
Some things that we are currently thinking about:
- As we do not know realistic values for damping, friction and so on, so far, we tried to use default values (or simply remove the respective tags from the URDF or the gazebo extension XACRO). In fact, we currently only set the <matrial> in the gazebo extension and use damping=0 and friction=0 in the URDF. (Friction is not implemented in Gazebo anyway, isn't it?)
Maybe setting some of these values would help reduce the oscillation and help in the PID tuning. However, I don't know what should be set or how we could approximate the respective values for our robot. Any good default values? Ideas?
- We also have had the <safety_controller> tag in our URDF. There were values for k_p and k_v, where I don't know where they come from.
When I removed the tag, the controller seems to behave (at least a bit) better.
Any counter-arguments against removing this tag from the URDF?
- Is it possible that a slower update frequency for the JointVelocityController might help the problem? Is this update frequency parameterizable? Where can I set it? I think the default is the gazebo tick rate, isn't it?
<gazebo>
<plugin name="gazebo_ros_control" filename="libgazebo_ros_control.so">
<controlPeriod>0.001</controlPeriod>
</plugin>
</gazebo>The code that does this is here:
@Adolfo:
Can you elaborate a bit more on what frequency-domain tools you were using? Do you mean Bode-Diagram and stuff like that?
So you have a mathematical model for your hardware, right?
Oh, two more things, that I cannot explain at the moment:
When I have a look at the process_value entry in the JointVelocityController state message, this should be the actual/current joint velocity, right?
This value is retrieved directly from the HardwareInterface/GazeboHandle joint_->getVelocity(),right?
How can it be that the process_value sometimes is higher than the velocity limit specified in the URDF? This mainly happens, when in the oscillation case, where it the arm is actually not moving at all (probably because the velocities equalize themselves).
Similar thing with the efforts.
When looking at the /joint_states/effort[] values, they seem to be correctly clamped to the effort limit as specified in the URDF.
However, using only one revolute joint (the others fixed) this effort sometimes is already used up just to keep the joint at velocity 0.
When we now command a velocity in the same direction as the effort (e.g. send negative velocity in case current effort is -effort_limit), the arm move but the current effort still is equal to the previous effort value (still -effort_limit).
How is it possible to move without being allowed to exceed the effort limit? (I saw that the command value in the state message of the JointVelocityController has values much higher than the effort limit (which seems to be ok, as the documentation for SetForce() says that the commanded effort is truncated to the effort limit).
To unsubscribe from this group and stop receiving emails from it, send an email to ros-sig-robot-control+unsub...@googlegroups.com.
Sorry for the late response Adolfo,
First of all thanks for the feedback. I guess what my main concern is how can I extract the velocity data being sent through the trajectory msg? I started digging around and came to the conclusion that I dont fully understand the difference between "effort_controllers/JointTrajectoryController" and "position_controllers/JointTrajectoryController".
At first I thought "effort_controllers/JointTrajectoryController" was giving me the relative position to which my joint should move to.
It did this by connecting and registering a "hardware_interface::EffortJointInterface jnt_pos_interface" object to a array named cmd[ ] (This is all from this tutorial). The cmd array had only one value for each joint, that being the relative position. Adolfo am I correct in assuming that? Or is the value being sent something different?
If I am correct in my assumption from above what is "position_controllers/JointTrajectoryController" for (I havent tried to use this controller yet)?
Also I was wondering does "effort_controllers/JointTrajectoryController" use joint_position_controller.cpp located in ros_controllers/effort_controllers/src directory? If so does the cmd [ ] (mentioned above) use the setCommand() function to get its target position data?
Finally I just wanted to know if I could use "effort_controllers/JointTrajectoryController" and some how grab the velocity values coming from the trajectory msg from moveit using it?
To unsubscribe from this group and stop receiving emails from it, send an email to ros-sig-robot-co...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to ros-sig-robot-control+unsubscri...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "ROS/Orocos Robot Control Special Interest Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ros-sig-robot-control+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Adolfo
Thank you soo much for the link, it really helped me break down the confusion :). My next question then is if the effort controller is outputing a position that uses the position error, and velocity error, how can I extract the velocity error? If possible I would like to continue using the effort controller and extract the velocity error from the command , so that I can control the arm using the velocity error. This way i can use velocity to control the arm and use the position error to determine other factors. Or should I go another route and use the velocity controller created for the joint_trajectory_controllers but still not released(https://github.com/ros-controls/ros_controllers/pull/64)?
If you have velocity-controlled joints, keep an eye on https://github.com/ros-controls/ros_controllers/issues/43
This would be the right way to do it.