1. Do not share user accounts! Any account that is shared by another person will be blocked and closed. This means: we will close not only the account that is shared, but also the main account of the user who uses another person's account. We have the ability to detect account sharing, so please do not try to cheat the system. This action will take place on 04/18/2023. Read all forum rules.
    Dismiss Notice
  2. For downloading SimTools plugins you need a Download Package. Get it with virtual coins that you receive for forum activity or Buy Download Package - We have a zero Spam tolerance so read our forum rules first.

    Buy Now a Download Plan!
  3. Do not try to cheat our system and do not post an unnecessary amount of useless posts only to earn credits here. We have a zero spam tolerance policy and this will cause a ban of your user account. Otherwise we wish you a pleasant stay here! Read the forum rules
  4. We have a few rules which you need to read and accept before posting anything here! Following these rules will keep the forum clean and your stay pleasant. Do not follow these rules can lead to permanent exclusion from this website: Read the forum rules.
    Are you a company? Read our company rules

6 dof master developing corner

Discussion in 'Miscellaneous' started by Robin, Jun 10, 2009.

  1. mboRacing

    mboRacing Member Gold Contributor

    Joined:
    Sep 16, 2007
    Messages:
    231
    Occupation:
    Automatiker
    Location:
    Switzerland -Eiken
    Balance:
    - 151Coins
    Ratings:
    +0 / 1 / -0
    Thank you Robin

    But i'm still don't know what PB means. From where to where is this measuring? Could you also imagine the other measurings (beta, Servo and PFO) a bit more? From where are platform points in zero pos and is the orientation of servo 4 and 5 the same or is one in positiv and the other in negative? Please complete and Ilustrate for 6DoF dummies :D

    Many thanks...

    Greetings Martin
  2. Robin

    Robin New Member

    Joined:
    May 8, 2009
    Messages:
    44
    Balance:
    51Coins
    Ratings:
    +0 / 0 / -0
    Hello Martin, great to see someone interested in 6dof design!
    So I'll do my best to explain this, if this is still not clear don't hesitate to ask questions.

    Servo[] are the angular position of the servo, it's our output variable. In 6dof master source code these are in radians. The servo moves, so that the platform moves. When a servo moves, the servo arm moves to a given position (Servo[] is this position) around its rotation axis. PB is situed on the rotation axis of each servo. This points give the correct positioning of the servos to the software so it can apply the reverse kinetics algorithms. For good accuracy you can mind the KneeCap and ServoArm thickness as I did in the previous drawing.

    All PB[] points should be situed on a circle which center coordonates are (0,0,-height).
    All PF0[] points should be situed on a circle. The center of the circle is the origin of the cartesien system (0,0,0).
    PFO[] are the basic points for the platform but are nor used in reverse kinetics algorithms. The points used are PF[] which are calculated like this:
    PF[] = PFO[] * pratio;
    PB[] = PB0[] * ratio;
    About that your graphic, there seems to be a mistake, maybe need to replace the servos.

    Hope this help, see attachement ;) .

    Attached Files:

  3. ebinary

    ebinary New Member

    Joined:
    Jun 23, 2009
    Messages:
    90
    Balance:
    2Coins
    Ratings:
    +0 / 0 / -0
    Hi Robin,

    New user here. Long time programmer. You seem to be the main guy interested in 6DOF around here (or maybe I haven't figured out the search engine too well).

    I've managed to aquire 6 industrial Exlar Linear Actuators (awesome) and drive units. I have worked out how to control them via the Modbus industrial standard.

    So now the trick it to create a platform, eh?

    Two things:

    1. I never found a link to your source... I only found the completed application (which is quite cool).
    2. Because I have linear actuators, I don't need the angular input required for a rotary servo. Will your system still work in this case? Is it still necessary? I honestly don't know what all the pieces of the puzzle are yet, but your seems the closest to what I am trying to do.

    Thanks, Eric
  4. Robin

    Robin New Member

    Joined:
    May 8, 2009
    Messages:
    44
    Balance:
    51Coins
    Ratings:
    +0 / 0 / -0
    Hi Eric, the reason why I don't post the source is because it's in perpetual evolution. So I've sent it to you by pm. The 6 dof master software needs some modification to adapt it to linear actuator but it's doable without too much efforts. If you need a hand for doing that, you can post your question here.
    To do the modifications:
    suppress all reference to PL[] points, L1, ServoLimit, Servo[], beta[] in the source code.
    Just calculate the length of each actuator by calculating ||PFTPB||. It's actually simplier that the actual design.

    Actually: replace in ReverseKinetics() method (6dofDlg.cpp)

    double cst = pow(L2,2) - pow(L1,2) - pow(A-PBT[0],2) - pow(B-PBT[1],2) - pow(C-PBT[2],2);
    double CO = - 2*(A-PBT[0])*L1*cos(beta) - 2*(B-PBT[1])*L1*sin(beta);
    double SI = - 2*(C-PBT[2])*L1;
    double buf = (-SI - sqrt( pow(SI,2) + pow(CO,2) - pow(cst,2)) )/(CO+cst);
    ServoBuf = -2*atan(buf);

    by:

    L2 = sqrt( pow(A-PBT[0],2) + pow(B-PBT[1],2) + pow(C-PBT[2],2) );

    L2 should give you the length of each actuactor if I'm right ;)

    gd luck with your mod,

    Robin
  5. ebinary

    ebinary New Member

    Joined:
    Jun 23, 2009
    Messages:
    90
    Balance:
    2Coins
    Ratings:
    +0 / 0 / -0
    Thanks Robin,

    Hopefully I will get a chance to look at it later this week. Will the changes to Reverse Kinetics change the animation, or is the animation expecting a rotary actuator exclusively.

    Eric
  6. ebinary

    ebinary New Member

    Joined:
    Jun 23, 2009
    Messages:
    90
    Balance:
    2Coins
    Ratings:
    +0 / 0 / -0
    Hi Robin,

    Ignore that last question. I found the rendering routine, and it looks pretty straightforward.

    Eric
  7. Robin

    Robin New Member

    Joined:
    May 8, 2009
    Messages:
    44
    Balance:
    51Coins
    Ratings:
    +0 / 0 / -0
    Hi Eric, there's just one line to suppress in the rendering routine to adapt it to your needs. When you're done working with the code could you share it to the community? mboRacing is interested by it too. Thks a lot!
    Btw you'll have to set up some limiters to limit the min and max lenght of your actuators. if not done already replace:

    if (pow(SI,2) + pow(CO,2) - pow(cst,2)<0){
    if (!crossed) SetDlgItemText( IDC_MSG, Out of Reach ! );
    flag=false;
    }

    by

    if ((L2<L2min)||(L2>L2max)){
    if (!crossed) SetDlgItemText( IDC_MSG, Out of Reach ! );
    flag=false;
    }

    You can choose different variable names....

    See ya,
    Robin
  8. ebinary

    ebinary New Member

    Joined:
    Jun 23, 2009
    Messages:
    90
    Balance:
    2Coins
    Ratings:
    +0 / 0 / -0
    Hi Robin,

    I made the changes to the ReverseKinetics and displayed the resulting accuator lengths in the Servo area of the main dialog box. The values seem reasonable.

    I am intrigued by your comment that the rendering can be fixed by a one line change. I have not been able to figure that out ;-). Currently.. since my change to calculate rod length, the simulator does nothing.

    Only an hour or so into it, but if you want to share your idea, I am listening ;-)


    Thanks! Eric
  9. Robin

    Robin New Member

    Joined:
    May 8, 2009
    Messages:
    44
    Balance:
    51Coins
    Ratings:
    +0 / 0 / -0
    Hi sorry for the late answer, I' m currently in vacation and I didn't brougth visual studio with me. if the simulator does nothing, that's because the boolean variable named 'flag' is set to false somewhere in the reversekinetics() method. Use the debugger to see which limiter sets flag to false and modify this limiter.

    Hope this helps,
    Greets,

    Robin
  10. Jackske

    Jackske New Member

    Joined:
    Jun 1, 2009
    Messages:
    1
    Balance:
    0Coins
    Ratings:
    +0 / 0 / -0
    Hi Robin,

    First of all, very nice project!! It would be really amazing if you could complete this project in only 6 weeks time :)

    Could i have a look at the source code too?

    Thanks in advance!
  11. ebinary

    ebinary New Member

    Joined:
    Jun 23, 2009
    Messages:
    90
    Balance:
    2Coins
    Ratings:
    +0 / 0 / -0
    Robin,

    You were correct about the false (I had left in the knee logic). I think I need to rearrange the bases for the linear actuator case. The are far too close together due to not being offset by the servo arm.

    Eric
  12. Robin

    Robin New Member

    Joined:
    May 8, 2009
    Messages:
    44
    Balance:
    51Coins
    Ratings:
    +0 / 0 / -0
    Hi everyone, I'm currently away from home spending time with family and friends. I got little time posting on the forum, so for everyone asking, here is the 6 dof source code

    Attached Files:

  13. ebinary

    ebinary New Member

    Joined:
    Jun 23, 2009
    Messages:
    90
    Balance:
    2Coins
    Ratings:
    +0 / 0 / -0
    Hi Robin,

    I've mostly been working on driving my Exlar actuators, so I haven't spent much time with your cool program, but I did have a question about 6dofmaster.

    I thought that Surge occurred on the same platform endpoints as Pitch (forward to back). Similarly, I thought sway occurred side-to-side (same endpoints as Roll). It seems that Sway and Surge are identified improperly in 6dofmaster, at least based on what happens in the 3D simulation. Not sure if that affects their connection with x-sim, because I haven't gotten that far.

    Do I understand this incorrectly?

    Thanks! Eric
  14. ebinary

    ebinary New Member

    Joined:
    Jun 23, 2009
    Messages:
    90
    Balance:
    2Coins
    Ratings:
    +0 / 0 / -0
    Hi Robin,

    Just in case you want to add another feather to your cap, check on my videos in the Ride-u-lator thread http://www.x-simulator.de/forum/post18239.html?hilit=6dof#p18239. My 6DOF is being successfully driven by a variation on your cool program.

    Eventually - when I trust every layer of the software stack, I'll just incorporate the kinemetics and my Emerson modbus control into a single profiler plug-in. But for now, I have about 8 programs running simultaneously, and it's all working fine ;-)

    Thanks again for your contribution.

    Eric

    P.S. I am now completely sure that the terms Sway and Surge are transposed in your program... I've switched them around in mine.
  15. Robin

    Robin New Member

    Joined:
    May 8, 2009
    Messages:
    44
    Balance:
    51Coins
    Ratings:
    +0 / 0 / -0
    Hi ebinary sorry for posting this late. I just put a reply on your project post telling all the good I think of your project and giving random idea about the limiters. Sway and surge maybe incorrectly identified, I have to check on it.
    8 programms running simultaneously that's nice! Hope you got a powerful pc or several ones! I have to thank you too for your contribution and having managed to build a full motion sim and so leading the way for full size diy 6 dof sims!

    See ya,

    Robin
  16. ebinary

    ebinary New Member

    Joined:
    Jun 23, 2009
    Messages:
    90
    Balance:
    2Coins
    Ratings:
    +0 / 0 / -0
    Thanks again for your help and contribution, Robin! I wouldn't be simulating without you.
  17. hcanova

    hcanova New Member

    Joined:
    Jul 8, 2011
    Messages:
    1
    Balance:
    0Coins
    Ratings:
    +0 / 0 / -0
    Hello everyone

    First congratulations for all things Robin has done for the community,

    I'm new in this forum and interests with the topic because I have a project for school that could take advantage of the inverse kinematics calculations, looking the source code I understood 80% but I have a problem with the calculations mainly to understand the passage below could please help me.

    Code:
    double cst = pow(L2[i],2) - pow(L1,2) - pow(A-PBT[0][i],2) - pow(B-PBT[1][i],2) - pow(C-PBT[2][i],2); //delta x
    
    double CO =  - 2*(A-PBT[0][i])*L1*cos(beta[i]) - 2*(B-PBT[1][i])*L1*sin(beta[i]); //delta y
    
    double SI = - 2*(C-PBT[2][i])*L1; //delta z
    
    double buf = (-SI - sqrt( pow(SI,2) + pow(CO,2) - pow(cst,2)) )/(CO+cst);
    		
    ServoBuf[i] = -2*atan(buf);
    
    what are the variables: cst, co and si ?

    how you calculated the angle ?

    Thanks for your attenntion
  18. rbaguley

    rbaguley New Member

    Joined:
    Nov 30, 2011
    Messages:
    1
    Balance:
    0Coins
    Ratings:
    +0 / 0 / -0
    Hey all, I know this is an older thread, but I am trying to load Robins 6DOF Master source code into Visual Studio 2011, but keep getting an error about a missing file called sd84.dsp that wasn't part of the package. I assume that this was an SDK or code to control the Devantec SD84, but I can't find it anywhere. Anybody got any ideas on this?
  19. MSK

    MSK Member

    Joined:
    Oct 9, 2011
    Messages:
    41
    Balance:
    53Coins
    Ratings:
    +1 / 0 / -0
    Hello,

    WOW... just WOW !!! Loved your program. I compiled it. Its running smoothly. I don't know if you still visit the forum, but thanks for sharing it with us.

    Is there anyone who modified the source ? I am planning to modify the source to drive my 6 linear actuators (hydraulic). Is there anyone willing to share their knowledge and help me on that ?


    Thanks.... and thanks again to Robin for sharing the code.

    Regards
    MSK
  20. tomosim

    tomosim New Member

    Joined:
    May 1, 2013
    Messages:
    1
    Balance:
    - 20Coins
    Ratings:
    +0 / 0 / -0
    Hello, everyone
    I have practiced back through this forum, that you guys have been in the past.
    I want to control rc servo using 6dof master in pololu maestro6.
    By not confirm the sd84 as past articles, I had a set of the output of the com port. But red led lights, servo does not work.
    What I mean to mini ssc mode is do you do?
    That buffer that has overflowed, or would not receive the return signal from the servo?

    Does anyone have seen this forum yet?
    Finally, I would like to thank Robin you have provided us with this great program.

    Best regards
    tomosim