E-Puck turns when given 0 velocity

Typically: "How do I... ", "How can I... " questions
Post Reply
greyWolf
Posts: 1
Joined: 16 Jun 2019, 02:00

E-Puck turns when given 0 velocity

Post by greyWolf » 20 Jul 2019, 02:11

Hi

I am trying to control an E-Puck using an external python script. The problem is, that when I set the joint velocities to zero, it still turns on the spot.

In the joint properties, I have ticked the box that says lock the joints when velocity is zero and I have set the velocity to 0. I set the values of the joint velocities to 0 using these commands

Code: Select all

self.err_code = vrep.simxSetJointTargetVelocity(self.clientID,self.l_motor_handle,0,vrep.simx_opmode_streaming)
self.err_code = vrep.simxSetJointTargetVelocity(self.clientID,self.r_motor_handle,0,vrep.simx_opmode_streaming)
l_motor_handle and r_motor_handle are the handles for the respective motors.

Code: Select all

self.err_code, self.l_motor_handle = vrep.simxGetObjectHandle(self.clientID,self.robotId+"epuck_leftJoint", vrep.simx_opmode_blocking)
 self.err_code, self.r_motor_handle = vrep.simxGetObjectHandle(self.clientID,self.robotId+"epuck_rightJoint", vrep.simx_opmode_blocking)

Is there something wrong with the parameters of the robot's joints? This is the behaviour even when I run the simulation without the external script. I tried to just set the velocities to zero using a Lua child script, but had the same problem. You can find screenshots with the settings for one of the joints. Its the same for the other joint.

https://drive.google.com/open?id=18SZbi ... SnI3lICh4h
https://drive.google.com/open?id=1YaOIT ... J_FxP4oHpn

What am I missing?

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

Re: E-Puck turns when given 0 velocity

Post by coppelia » 29 Jul 2019, 10:05

Hello,

Did you try with another physics engine? Does it also happen? Can you try to slightly increase the mass and inertia of the wheels? This might directly be linked to design considerations 7-8.

Cheers

Post Reply