Simulation of 2 D.O.F platform

Typically: "How do I... ", "How can I... " questions
Dragunner
Posts: 21
Joined: 30 Mar 2017, 12:12

Simulation of 2 D.O.F platform

Postby Dragunner » 30 Mar 2017, 12:38

Hello,
I'm currently doing my internship for a company and trying to simulate the movement of a ship on water (mainly the roll and pitch of the ship).
The goal after simulating this roll and pitch for a platform is tu add a stabilization system on it and see if it works well.

I'm currently stuck even after looking at some tutorials and topic on this forum ...

This is what I have for now, Pitch and Roll are here as path but they are basically my CSV files with my rotations.

Image

Image

My problem is the junction between the sphere/base and sphere/platform I would like just to have my platform rotating along x and y . Right now my sphere is just rolling down to the base and same for my platform like there is no joint between them.
Maybe my model isn't good but actually I'm a bit lost in V-rep for now ...

Respectfully,

Dragunner
Posts: 21
Joined: 30 Mar 2017, 12:12

Re: Simulation of 2 D.O.F platform

Postby Dragunner » 31 Mar 2017, 08:46

Okay I made a good model now and I made an IK sim but I'm trying to figure out how to make my new platform follow an angular position !

Image

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

Re: Simulation of 2 D.O.F platform

Postby coppelia » 31 Mar 2017, 11:05

Hello,

I am not sure what you exactly want to achieve. Do you want to perform a purely kinematic simulation? From my understanding the answer is yes, since you want to feed the platform with prerecorded data from a file, so that the platform mimics that orientation.

So in that case make sure that all shapes are static and non-respondable. And that all joints are in passive mode. Then you can set the individual positions of the joints (e.g. with simSetJointPosition) and observe the platform's position.

If however you want to decide the orientation of the platform and then extract the joint angles that correspond, then your joints need to be in IK mode, and you better follow that tutorial.

Cheers

Dragunner
Posts: 21
Joined: 30 Mar 2017, 12:12

Re: Simulation of 2 D.O.F platform

Postby Dragunner » 31 Mar 2017, 14:23

Hello,
Yes you were right my goal was to make the platform follow orientations point given by logs from a CSV.
But in the end I would like to put a dynamic object on this platform ! (will it be possible in IK mode and not respondable shape as parent ?)

Right now I followed informations from Marc Freese and it works well but I'm stuck with my path !

It contains 2387 points that are recorded with a sampling period of 0.119s but when I'm playing the path it only goes to the last position , is it possible to make it follow the full path with the real sampling period between each point ? If yes how ?

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

Re: Simulation of 2 D.O.F platform

Postby coppelia » 03 Apr 2017, 08:24

You can still put a dynamic object on top of the platform. You will however have to mark the top of the platform as respondable.

The easiest in your case is to have all the points in a data structure and then, in each simulation step, compute an interpolated point from the current simulation time. Then feed that point to the IK target position/orientation dummy.

Cheers

Dragunner
Posts: 21
Joined: 30 Mar 2017, 12:12

Re: Simulation of 2 D.O.F platform

Postby Dragunner » 03 Apr 2017, 08:43

Perfect ! I'll try to do that and upload what I get in the end !

Dragunner
Posts: 21
Joined: 30 Mar 2017, 12:12

Re: Simulation of 2 D.O.F platform

Postby Dragunner » 04 Apr 2017, 15:31

Hello,
Si I've succeeded in making the structure moving like my CSV logs , I also added a smal system to see how it react to the rotations of the platform:

Image

I've put all the bodies in dynamic and respondable ( and the support of the platform only in respondable mod).

I then added my joint in torque force and try to run the sim , then my newly added structure which is on the top of my rotating platform is just moving in all ways.

I also tried in passive mod and it seems like the second shape which is linked to the platform by a joint is just faling..? (I also icnreased the mass and it doesn't seems to change my response.

Does anyone got some ideas about this ?

Best regards

Edit: It looks like a collision problem between my support and the first dynamic shape

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

Re: Simulation of 2 D.O.F platform

Postby coppelia » 04 Apr 2017, 21:20

Please post your scene, that it will be easier to guess what is going on.

Cheers

Dragunner
Posts: 21
Joined: 30 Mar 2017, 12:12

Re: Simulation of 2 D.O.F platform

Postby Dragunner » 05 Apr 2017, 07:59

Hello,
Here you have the scene file !

https://ufile.io/035a7

Thanks !

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

Re: Simulation of 2 D.O.F platform

Postby coppelia » 07 Apr 2017, 08:18

It seems that:

  • Your script is producing errors. This needs to be fixed first, otherwise it is difficult to say what is going on normally.
  • Some adjacent elements are colliding with each other. This will produce instabilities and shaking motions. Make sure to adjust those shape's local respondable masks, so that their do not respond to collision with adjacent shapes. You can also simply disable the respondable flag for some of the shapes.
  • Finally, you are using random meshes as respondable shapes. Those are really not recommended since they are very slow and very unstable. Much better is to use convex shapes (or a compound of convex shapes), or pure shapes. Make sure to carefully read this page.

Cheers


Return to “General questions”

Who is online

Users browsing this forum: Google [Bot], Solenoid and 18 guests