Designing Robot Model containing Parallel Bar Mechanism

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

Designing Robot Model containing Parallel Bar Mechanism

Postby ravi » 30 Aug 2017, 11:13

Hi,

I am designing a robot model containing parallel bar mechanism. The mechanism is shown in the picture below:
https://www.dropbox.com/s/p53gxz4qmxsua ... l.png?dl=0

The robot model consists of several parts and motor as the actuator. It has few passive joints as well. Below is the screenshot of the model:
https://www.dropbox.com/s/4p8vba4edjqil ... p.png?dl=0

Here is the detailed description of the model. The motor is mounted on the motor adaptor. One side of the top connector is connected to motor adaptor using 2 passive joints (PassiveJoint1 and PassiveJoint2 ) and another side is connected to leg using 1 passive joint (PassiveJoint4). Similarly, one side of the bottom connector is connected to the motor shaft (MotorJoint) and the same side of the bottom connector is connected to motor adaptor using another passive joint (PassiveJoint3). The another side of the bottom connector is connected to the leg using passive joint (PassiveJoint5). Hence, we can say leg is supported by two passive joints (PassiveJoin4 and PassiveJoint5).

Please download the scene file from the following URL:
https://www.dropbox.com/s/rf70lqzhmsqja ... y.ttt?dl=0

Just in case, if there is some issue, I am using the latest version of VREP as shown in the screenshot below:
https://www.dropbox.com/s/6kks7lormd3g3 ... p.png?dl=0

I would like to know, how to model this scene. I am going to provide the joint angle to the motor, which is going to move the leg. (Please note that I haven't added the shaft adaptor plate just to keep the model simple).

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

Re: Designing Robot Model containing Parallel Bar Mechanism

Postby coppelia » 31 Aug 2017, 08:29

Hello,

for stability and simplification, I would start by considering each leg as a kinematic chain: forget at first about the loops in that chain or the loop closure links. Next, identify the joints that need to be active for the kinematic chain to be able to work (and walk!). Those joints could be passive joints on the real robot, it doesn't matter. Active joints will be controlled in position. The equations for their angular positions are derived from the geometry of the mechanism and the angular value of the driving motors (on the real robot). This way, you can make your robot walk.
Finally, you need to take care of the loop closures. This could be handled in a similar way, by using an active joint (calculated in position) to mimic the loop closure.
Of course you could use real loop closures, but you might run into stability issues, things will be slower, and you might have to introduce auxiliary DoFs for the physics engine to run correctly.

Cheers

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

Re: Designing Robot Model containing Parallel Bar Mechanism

Postby ravi » 31 Aug 2017, 15:19

Thanks admin for the suggestion.

To simplify the problem, I made the skeleton model of it. Please see the scene file here:
https://www.dropbox.com/s/xs5xwgzka6ozv ... l.ttt?dl=0

For a quick view, please see the screenshot of VRep window below:
https://www.dropbox.com/s/8d1a5sgagynht ... p.png?dl=0

In this model:
  • There is only 1 active joint, which is MotorJoint
  • There are 5 passive joints, which are PassiveJoint1, PassiveJoint2, PassiveJoint3, PassiveJoint4 and PassiveJoint5

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

Re: Designing Robot Model containing Parallel Bar Mechanism

Postby coppelia » 01 Sep 2017, 12:55

I would use following scene hierarchy:

Code: Select all

MotorAdaptor --> MotorJoint --> BottomConnector --> PassiveJoint5 --> Leg
             --> PassiveJoint1 --> TopConnector


And all above joints would be active, controlled in position. In each simulation loop, you can set the motor angles in following way:

MotorJoint: angle
PassiveJoint1: angle
PassiveJoint5: -angle

This way you get rid of the loop closure in a very simple way.

Cheers

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

Re: Designing Robot Model containing Parallel Bar Mechanism

Postby ravi » 02 Sep 2017, 05:27

Thank you very much. I really liked your idea to avoid loop closure in a very clever way.

I changed the scene hierarchy as per your suggestion. Please see below the screenshot of V-Rep:
https://www.dropbox.com/s/b0s1axn5isrhz ... p.png?dl=0

Just to keep the naming convention easy, PassiveJoint1 and PassiveJoint5 have been renamed to ActiveJoint1 and ActiveJoint5 respectively. However, I couldn't find the way to set them active, the best possible match was Inverse Kinematics Mode (I am not interested in Dynamics. More precisely, I just want to provide joint angles and see the motion of the robot). Please see below the screenshot of Joint Properties:
https://www.dropbox.com/s/ig8dxg5kxwx1p ... e.png?dl=0

Though I will be controlling it from Python later on, however just to check it, I have added a Non-threaded child script with following Lua code:

Code: Select all

    handleMotorJoint=simGetObjectHandle('MotorJoint')
    handleActiveJoint1=simGetObjectHandle('ActiveJoint1')
    handleActiveJoint5=simGetObjectHandle('ActiveJoint5')
   
    simSetJointPosition(handleMotorJoint,jointAngle)
    simSetJointPosition(handleActiveJoint1,jointAngle)
    simSetJointPosition(handleActiveJoint5,-jointAngle)


Please find below the scene file:
https://www.dropbox.com/s/xazywjwudbk4v ... 1.ttt?dl=0

Thanks again

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

Re: Designing Robot Model containing Parallel Bar Mechanism

Postby coppelia » 06 Sep 2017, 08:01

ActiveJoint1, MotorJoint and ActiveJoint5 need to be in force/torque mode, their motor needs to be enabled, and the control loop also needs to be enabled for them. Then you can modify their desired angular value with simSetJointTargetPosition (or simxSetJointTargetPosition).

It is also important to refer to this page, when dealing with physics engines.

Cheers

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

Re: Designing Robot Model containing Parallel Bar Mechanism

Postby ravi » 07 Sep 2017, 10:29

It works. Thank you so much. I have a fundamental doubt here.

If I am not mistaken, in the earlier versions (may be 1 year before), V-Rep had position control separately. Why do we need to select force/torque mode, when we want to do position control?

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

Re: Designing Robot Model containing Parallel Bar Mechanism

Postby coppelia » 10 Sep 2017, 11:43

You can only do position control if the joint is in force/torque mode: in that case, the joint cannot instantaneously jump to a desired position, and a position controller is required. On the other hand, if a joint is not in force/torque mode, it can instantaneously jump to another position, and a position controller is not required.

Cheers

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

Re: Designing Robot Model containing Parallel Bar Mechanism

Postby ravi » 20 Sep 2017, 11:53

Hi,

Thanks a lot for the explanation.

Now I am able to simulate the skeleton model. However, I still have issues such as non-convex shape in CAD model. Below is the screenshot of the warning, shown during simulation, while using pure CAD model:
https://www.dropbox.com/s/uih3hgw3movwp ... e.png?dl=0

As expected, the simulation was not looking real at all. Hence, I converted "BottomConnector", "TopConnector" and "Leg" into convex shapes by using "Morph selection into convex shapes" option. The converted shapes aren't looking appropriate to me. Anyway, I run the simulation and the motion is still not close to reality. Please see the screenshot of the simulation:
https://www.dropbox.com/s/k4om9d0wob8mi ... e.png?dl=0

Below are the scene files:

Any suggestions, please?

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

Re: Designing Robot Model containing Parallel Bar Mechanism

Postby coppelia » 22 Sep 2017, 08:32

The best would be to look at a robot model in the model library (e.g. Models/robots/non-mobile/KUKA LBR iiwa 14 R820.ttm). Inspect the model in the scene hierarchy, and also invert the visible layers to see the hidden parts of the robot. Also have a look at this tutorial.

Morphing an object into its convex decomposition doesn't always work nicely, and you might have to ungroup/divide a shape manually, creating convex sub-shapes, and grouping them again. A rough approximation for parts that usually never collide (i.e. NOT the feet tips) is often enough. Make sure that if there are overlapping shapes, that their respondable masks do not intersect.

Cheers


Return to “General questions”

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 21 guests