Unable to change joint limits

Typically: "How do I... ", "How can I... " questions
Post Reply
ravi
Posts: 73
Joined: 24 Oct 2016, 08:00

Unable to change joint limits

Post by ravi » 08 Mar 2018, 11:08

In my Hexapod, I want that all the joints move until they collide. Hence I want to keep the joints limit 360 degrees (allow them to move complete one rotation). However, the VREP is not allowing to do so.

The joints are going to be position controlled using remote API function i.e., vrep.simxSetJointTargetPosition. Hence Joints are set in Torque mode.

After providing some joint angles, the bot doesn't move and looks like following:
https://www.dropbox.com/s/gqlg3cwd1nc5w ... s.png?dl=0

I suspect that the input joint angles are beyond joint limits and hence the bot is not able to move.

The scene file can be seen here:
https://www.dropbox.com/s/ov0hud9gdpqtv ... 2.ttt?dl=0

How to set the joint limits to 360 degrees?

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

Re: Unable to change joint limits

Post by coppelia » 08 Mar 2018, 12:56

The joints are free to take any cyclic position. You need to update the target positions for your joints. When you start simulation, there is no script in the scene with any relevant code. So each joint will simply drive to its target position.

Cheers

ravi
Posts: 73
Joined: 24 Oct 2016, 08:00

Re: Unable to change joint limits

Post by ravi » 08 Mar 2018, 14:57

There is a configuration inside the Torque mode which is related to PID controlller. Inside this window, there is target position, which was looking like the target position of the joint to me.

Anyway I am controlling using Python Remote API. I am using vrep.simxSetJointTargetPosition function which is working fine for other joint angles but doesn't work for few joint angles. Actually the joints move initially but then stop moving (stuck maybe).

Initially I suspected collision in the bot but the collision module is not marking anything red, which means that there is no collision. Isn't it?

The return value of vrep.simxSetJointTargetPosition is always 0, which means it is able to set the position. Am I thinking right?

Is there a way to check why the bot stopped working for some joint angles?

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

Re: Unable to change joint limits

Post by coppelia » 12 Mar 2018, 07:18

You have to be careful not to mix-up two different things:
Above two modules are independent from each other. So your physics engine might be generating (and reacting to) collisions, while the collision detection module doesn't detect them (e.g. because the collision detection module is testing an other set of shapes for instance).

You can visualize dynamics collisions by enabling Display contact points.

Cheers

Post Reply