Prismatic joint actuation

Typically: "How do I... ", "How can I... " questions
TomDelaney
Posts: 22
Joined: 31 Jul 2022, 19:48

Prismatic joint actuation

Post by TomDelaney »

Hi,

I am currently building an upper body exoskeleton model and the following issue occured. I have an upperbody arm with revolute joints as the arm's shoulder and elbow joint and I have seven actuators which will be responsible for the moving of the arm. The problem I have is that I want the upper arm to depend on both the revolute joints of the shoulder and the prismatic actuator joints.

My questions is: how can I make it possible for the upper arm to respond to each of the joints and also for the other joints to react to the movement of the upper arm (for example: if one actuator applies force to the arm, the angle of the revolute joints of the shoulders should change), also for all the joints to be connected to the arm and for their constraints to be applied?

In the following link you can find a picture of the setup: https://drive.google.com/drive/folders/ ... L-ZLlRrxsj

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

Re: Prismatic joint actuation

Post by coppelia »

Hello,

so if your joints are dynamically enabled, then you can link one joint to another joint via a joint callback function. E.g. have a look at the following model: Models/componenets/grippers/Baxter gripper.ttm. Open the model hierarchy and inspect the joint callback function of the script attached to object centerJoint: that joint basically follows (in position) the position of the closeJoint, via a linear equation.

Cheers

TomDelaney
Posts: 22
Joined: 31 Jul 2022, 19:48

Re: Prismatic joint actuation

Post by TomDelaney »

Hi,

Thanks for your help. However I have a problem while trying to build the scene hiearchy as shown in the Baxter gripper.ttm. The problem comes from the fact that the prismatic joints connect to the same components from different places. I was wondering if there is any way I could solve this problem.

Also I have upladed the .ttt file in the google drive folder.

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

Re: Prismatic joint actuation

Post by coppelia »

You will have to use loop closures.

Cheers

TomDelaney
Posts: 22
Joined: 31 Jul 2022, 19:48

Re: Prismatic joint actuation

Post by TomDelaney »

Hello,

I have tried to implement loop closures as you said before and as far as I can tell it solved the problem, however I still run into two problems. When I start the simulation the two parts of the arm move as if the actuators exert force onto them. The second one is that the connecting pieces (act6_humerus, etc..) which are on the arm of the robot start to move when the simulation starts, altough they are rigidly binded together. I was wondering how I could solve the following problem. I have also uploaded this coppeliasim file onto the drive folder.

Thank you for your help in advance!

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

Re: Prismatic joint actuation

Post by coppelia »

Make sure that at simulation start, all pair of linked dummies have the exact same position and orientation. i.e. if you have two dummies linked via a loop closure (or dynamic overlap constraint), then the physics engine will try to bring them on top of each other, so that they coincide in position and orientation. This is the movement you observe at the begin of your simulation.

Cheers

TomDelaney
Posts: 22
Joined: 31 Jul 2022, 19:48

Re: Prismatic joint actuation

Post by TomDelaney »

Hello,

Thank you, with your help I have solved my issues, however I still have a problem actuating the arm. The problem arises from the fact that when I controll the actuators using the sim.setJointTargetForce() functions ther arm is still not moving despite the actuators force. I tried having a callback function for the joints which act as the shoulder and elbow of the arm, but even with a callback function there is no movement so this might not be the case. My question to you is if you could tell me what I should do to make these actuators move the arm either in the file with seven actuators or in the simplified file with only one actuator and one joint.

Thank you for your help in advance!

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

Re: Prismatic joint actuation

Post by coppelia »

is your joint dynamically enabled? i.e. is the a small bouncing ball icon next to it, in the scene hierarchy? Then, what dynamic mode is the joint in? It should not be in free mode.
Finally, you have several modes you can use: force/torque, velocity or position. Depending on the mode, you'll have to use sim.setJointTargetForce, sim.setJointTargetVelocity or sim.setJointTargetPosition.
What version of CoppeliaSim are you running? (including the revision)

Cheers

TomDelaney
Posts: 22
Joined: 31 Jul 2022, 19:48

Re: Prismatic joint actuation

Post by TomDelaney »

Yes every joint is dynamically enabled. They are in position control mode. I am using sim.setJointTargetForce as I want to actuate these joints based on a given force. And I am using CoppeliaSIm 4.3.0 Edu version.

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

Re: Prismatic joint actuation

Post by coppelia »

in position control mode you should use sim.setJointTargetPosition.
If you want to control, the joint in force/torque, set it in force/torque mode and use sim.setJointTargetForce.
You didn't tell me what revision you have. But the force/torque mode has a bug in the last revision, and as a workaround, use the velocity mode, set a very high velocity with sim.setJointTargetVelocity and then you can control it in force/torque with sim.setJointTargetForce

Cheers

Post Reply