Hi,
I have a robot model with btHingeConstraint as joints.
Some joints I have the problem that they drift away quickly on zero velocity target. Other joints dont have that problem.
For one joint it is particularly bad, it drifts at 0 target velocity with 7degree/second. And I have to set -7 degree/s to aprox. reach 0 velocity.
I tried giving btHingeConstraint::enableAngularMotor() high and low maxMotorImpulse values, but that change anything.
The problem occurs in joints with pretty high torque from gravity and in joints with basically zero torque from gravity.
All joints are setup the same way and controlled the same way, so there are no differences.
What could be the reason for that drift in some joints?
Thanks!
veio
btHingeConstraint does not achieve velocity for some joints
-
- Posts: 9
- Joined: Sun Aug 21, 2016 6:04 pm
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Re: btHingeConstraint does not achieve velocity for some joi
Could links of the robot are in penetration? Is the effect due to gravity? Can you reproduce it in the Bullet example browser?
Aside from this, have you considered using Bullet btMultiBody instead? It is more suitable for robotics (no joint gap ever), and there is URDF and SDF import, as well as Python bindings through pybullet.
Aside from this, have you considered using Bullet btMultiBody instead? It is more suitable for robotics (no joint gap ever), and there is URDF and SDF import, as well as Python bindings through pybullet.
-
- Posts: 9
- Joined: Sun Aug 21, 2016 6:04 pm
Re: btHingeConstraint does not achieve velocity for some joi
Thank you for the quick reply!
There shouldnt be any penetration. The debug drawing does not show any contacts. Only contact with the ground.
Yes, the effect seems to be due to gravity. If I move the robot so that the torque on the joint is bigger, the drift is even higher.
Though, another joint that also has a lot of torque due to gravity does not show this effect at all.
What do you mean by "reproducing it in the bullet example browser"?
Regarding multibody: I think a colleague was working on that, but didnt seem to work so far. Though, I dont know any details about that (and he is currently on vacation - so I cannot ask).
There shouldnt be any penetration. The debug drawing does not show any contacts. Only contact with the ground.
Yes, the effect seems to be due to gravity. If I move the robot so that the torque on the joint is bigger, the drift is even higher.
Though, another joint that also has a lot of torque due to gravity does not show this effect at all.
What do you mean by "reproducing it in the bullet example browser"?
Regarding multibody: I think a colleague was working on that, but didnt seem to work so far. Though, I dont know any details about that (and he is currently on vacation - so I cannot ask).
-
- Posts: 350
- Joined: Sat Jul 04, 2015 10:33 am
- Location: Bern, Switzerland
Re: btHingeConstraint does not achieve velocity for some joi
Hi Vein,
What Erwin means by reproducing it in the example browser is that you could implement a simple version of your issue in the example browser so that you can easily post the code here for others to reproduce the issue. This usually makes it very easy to sort things out. The example browser is included with your bullet library download.
What Erwin means by reproducing it in the example browser is that you could implement a simple version of your issue in the example browser so that you can easily post the code here for others to reproduce the issue. This usually makes it very easy to sort things out. The example browser is included with your bullet library download.
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Re: btHingeConstraint does not achieve velocity for some joi
I would suggest expressing your robot as a URDF file (or SDF file) so that we can easily look at it, simulate it etc.
URDF is a very common Universal Robot Description Format, created by Willow Garaga/OSRF/ROS/Gazebo developers.
Using URDF files is the best way to use robotics and Bullet as well, and it automatically support import of URDF into btMultiBody or btRigidBody+constraints.
URDF is a very common Universal Robot Description Format, created by Willow Garaga/OSRF/ROS/Gazebo developers.
Using URDF files is the best way to use robotics and Bullet as well, and it automatically support import of URDF into btMultiBody or btRigidBody+constraints.