-
Notifications
You must be signed in to change notification settings - Fork 773
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
[gazebo_ros_control] PositionJointInterface not working on gazebo 7 / ros kinetic #479
Comments
Anything new on this? |
Get time to look at it today. In the file "default_robot_hw_sim.cpp", if you use the POSITION_PID instead of POSITION for the joint_control_methods_ there is no more problem. So the problem seems to be in gazebo when using SetPosition instead of SetForce. |
@vincentrou, you are right. Using POSITION_PID instead of POSITION solved the issue. Thanks! Is there already a PR on this? |
In fact, I think the problem is in gazebo so I have open an other issue. I have also created a branch to reproduce the problem based on the gazebo ros_control tutorial |
Thanks again, @vincentrou. Well, what I want is a simulated arm that just executes the trajectories that moveit provides. I'm sock about how difficult is this in Gazebo7!
I get this WARNs all the time and tf tree collapses because the base doesn't provide odom -> base_footprint. Apart from this, I have a question, if you don't mind answering here:
And then I define two controllers, one JointTrajectory and one JointPosition:
as in the rear robot (turtlebot_arm). This used to work in Gazebo2-indigo. Makes still sense in Gazebo7-Kinetic? |
@corot I do not use moveit, you should ask it at answers.ros.org |
What Happened with this issue? Any progress? Have the exact same problem here. |
try to use |
I'm experiencing this problem as well. Using |
I can also confirm this issue on Kinetic/Gazebo 7. |
You can fix the problem by fixing manually pid gains for your
It seems that they will not put back the previous behavior in gazebo : https://bitbucket.org/osrf/gazebo/pull-requests/2598/fix2111/diff |
Hi, still experiencing issues with type: "position_controllers/JointGroupPositionController"
joints:
- joint_1_1
- joint_1_2
- joint_1_3
- joint_2_1
- joint_2_2
- joint_2_3
- joint_3_1
- joint_3_2
- joint_3_3
- joint_4_1
- joint_4_2
- joint_4_3
- joint_5_1
- joint_5_2
- joint_5_3
- joint_6_1
- joint_6_2
- joint_6_3
gazebo_ros_control:
pid_gains:
joint_1_1: {p: 100.0, i: 0.01, d: 10.0}
joint_1_2: {p: 100.0, i: 0.01, d: 10.0}
joint_1_3: {p: 100.0, i: 0.01, d: 10.0}
joint_2_1: {p: 100.0, i: 0.01, d: 10.0}
joint_2_2: {p: 100.0, i: 0.01, d: 10.0}
joint_2_3: {p: 100.0, i: 0.01, d: 10.0}
joint_3_1: {p: 100.0, i: 0.01, d: 10.0}
joint_3_2: {p: 100.0, i: 0.01, d: 10.0}
joint_3_3: {p: 100.0, i: 0.01, d: 10.0}
joint_4_1: {p: 100.0, i: 0.01, d: 10.0}
joint_4_2: {p: 100.0, i: 0.01, d: 10.0}
joint_4_3: {p: 100.0, i: 0.01, d: 10.0}
joint_5_1: {p: 100.0, i: 0.01, d: 10.0}
joint_5_2: {p: 100.0, i: 0.01, d: 10.0}
joint_5_3: {p: 100.0, i: 0.01, d: 10.0}
joint_6_1: {p: 100.0, i: 0.01, d: 10.0}
joint_6_2: {p: 100.0, i: 0.01, d: 10.0}
joint_6_3: {p: 100.0, i: 0.01, d: 10.0} but seems to have no effect... Changing in VelocityControl will fix the slow-fall, but I need position controls. |
@vincentrou I can confirm that adding the PID gain paramters to the |
This issue is resolved since the gazebo issue is fixed and integrated in gazebo9. |
Sorry, can't make Gazebo9 work. I've run this commands: sudo add-apt-repository "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable xenial main"
wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add -
sudo apt-get install ros-lunar-desktop-full
sudo apt-get install gazebo9 that will produce:
and now when I try to launch something with ROS+Gazebo through |
You need also to install gazebo9 ros_wrapper |
Perfect, now it works, but on Gazebo 9.0.0-1 (currently latest) the problem is not fixed. I'll wait for the next release. |
Interesting... I tried 2 weeks ago and it worked with the first gazebo9 released, and stopped working after upgrading. Has been the fix dropped from last release? 😮 |
@corot when you say gazebo9 worked two weeks ago, was that by setting the preserveWorldVelocity flag to true? Now that fix does not work? I just want to check before replacing gazebo7 with 9. How does one set the preserveWorldVelocity flag when using roslaunch and urdf? @Maik93 you have experience with this, correct? |
If it helps, there has been only one release of gazebo9, 9.0.0. |
Ups... sorry, I confused two different issues. What is solved for me in Gazebo9 is the super-inertia in the arm. to make it work, I set preserveWorldVelocity to true on gazebo_ros_control:
That was part of my problem shown in the video of my first post. But I still have problems with the trembling arm on Gazebo9. I tried @vincentrou suggestion of adding PID values:
|
When I try @vincentrou's sugestion of using POSITION_PID instead of POSITION in this line I get this curious effect just by unpausing Gazebo
|
This fixes the problem related to Gazebo's position control, which can be seen when dropping a position-controlled robot. The issue is fixed by using the _preserveWorldVelocity argument introduced in Gazebo 9.0.0. https://bitbucket.org/osrf/gazebo/pull-requests/2814/fix-issue-2111-by-providing-options-to/diff Related issue/commit in gazebo_ros_pkgs, which introduces a similar fix: ros-simulation/gazebo_ros_pkgs@3164e4c ros-simulation/gazebo_ros_pkgs#479
Any fix for this? pid_gains addition to my ros control namespace didn't fix anything. |
To make it work on kinetic with gazebo9 you will need this fix #688 |
@vincentrou Would this work with Gazebo 7? with the fix. Edit: Read your link at #688. I guess the only option is then to use VelocityJointInterface or JointCommand? |
There is currently one issue with Gazebo 7.12.0, when a manipulator is grasping an object with its gripper, then when it is performing a motion the gripper tends to open and close due to some unknown reasons, releasing the grasping object and going to its desired position. So you know the possible reason for this issue?. This didn't happen in Indigo version of gazebo. Any idea?. The problem persists when using with the SetForce |
This happens when your controller_manager is not launched. https://answers.ros.org/question/214712/gazebo-controller-spawner-warning/ |
as found in ros-simulation/gazebo_ros_pkgs#479 and reported by the warning The default_robot_hw_sim plugin is using the Joint::SetPosition method without preserving the link velocity. As a result, gravity will not be simulated correctly for your model. Please set gazebo_pid parameters, switch to the VelocityJointInterface or EffortJointInterface, or upgrade to Gazebo 9.
I would just like to leave this here. In case you are using PositionJointInterface (on Melodic/Gazebo9) and it doesn't work as expected, supply negative PID values. For some reason the Gazebo system provides positive feedback instead of negative. |
When I load an urdf in gazebo 7.0 (ros kinetic) with a PositionJointInterface for the joint transmission hardwareInterface, I get a robot floating in the air and I can't control the joint.
If I use a VelocityJointInterface instead, it is working fine.
The same urdf is working fine on gazebo 2.2.3 / ros indigo.
Could it be related to this ? https://bitbucket.org/osrf/gazebo/issues/1138/set-joint-positions-in-jointcontroller
The text was updated successfully, but these errors were encountered: