Issue in fetching joint velocity

Typically: "How do I... ", "How can I... " questions
Post Reply
Adersh M
Posts: 23
Joined: 30 Nov 2022, 06:52

Issue in fetching joint velocity

Post by Adersh M »

I am trying to run a rover (scene in the link). It has six-wheel motors. I am using bullet 2.78 which has set the same PID values for all 6 joints. When I use getJointVelocity to check if the joints are following the commanded velocity, I find that all wheels run almost at the commanded speed except for wheel 3 (/RMW in the scene). I checked th rpy in urdf, tried removing and adding another joint, and also verified that the wheel friction parameters are the same for all the wheels. The third wheel still returns a different rpm from that is commanded

https://drive.google.com/drive/folders/ ... drive_link

coppelia
Site Admin
Posts: 10647
Joined: 14 Dec 2012, 00:25

Re: Issue in fetching joint velocity

Post by coppelia »

Hello,

your target velocity for that joint is not the same. Also, always make sure that the joint is able to deliver the torque, i.e. has set a Max. torque high enough.

Cheers

Adersh M
Posts: 23
Joined: 30 Nov 2022, 06:52

Re: Issue in fetching joint velocity

Post by Adersh M »

Target velocity is a variable calculated via MATLAB. The idea is to take CG trajectory for random wheel velocities. I have given a target velocity of zero in the GUI for all joints as they are controlled from MATLAB. Velocity commands are then directly given as in the code. I have also tried adding a high Max torque. It doesn't work.

coppelia
Site Admin
Posts: 10647
Joined: 14 Dec 2012, 00:25

Re: Issue in fetching joint velocity

Post by coppelia »

Then provide a self-contained, mimalistic scene that illustrates your problem. Does that also happen with another physics engine?

Cheers

Adersh M
Posts: 23
Joined: 30 Nov 2022, 06:52

Re: Issue in fetching joint velocity

Post by Adersh M »

I have updated the scene with a python childscript at the rover base. You can see the commanded and actual velocities in the command line when you run the simulation. Pasting the link again. Please check.

https://drive.google.com/drive/folders/ ... drive_link

coppelia
Site Admin
Posts: 10647
Joined: 14 Dec 2012, 00:25

Re: Issue in fetching joint velocity

Post by coppelia »

Specially with engines like Bullet, ODE, you will have to scale up all inertias, otherwise things might not behave as expected. See also design considerations 7 & 8. So if I scale up by 8 all inertias in the robot, things are much better.

Besides, you'll never have a perfect velocity control.

Cheers

Adersh M
Posts: 23
Joined: 30 Nov 2022, 06:52

Re: Issue in fetching joint velocity

Post by Adersh M »

Thank you. Do I have to do it individually or is there a way to scale up inertia for all selected objects?

Adersh M
Posts: 23
Joined: 30 Nov 2022, 06:52

Re: Issue in fetching joint velocity

Post by Adersh M »

I changed the inertia, and it works now. You have been really helpful. Thank you very much

Post Reply