Jump to content
Sign in to follow this  

Roboarm command info

Recommended Posts


I have extract game data and i have look at the files.

First thing, i'm not a coder yet, i only touch at high level such as HTML, CSS and others, but i have never do something more deeper than lua and php in a game.

So low level code like C and C++ i don't have yet learn it, but i still able to understand the bases of what is inside the game files of Take On Mars.

I have found the onsim_roboarm.h inside *\scripts\entities\controllers\instruments

And i want to try to make the Topt Roboarm command working.

I want to try it, fun fun and both try to learn myself bases of this level of coding and help you, cause if i can get a working solution i will of course obviously send the code, but i know that i will probably fail to it.

I want to try to make my own sequence based on instrument (already explain in my suggestion post)

Command :

TOPT RoboArm (instrument) Like Topt RobArm1 APXS1 for example

I expect this sequence to be done :

(1) Measure distance between point and arm attachment point, if too close or too far command fail, them measure angle, if its out of the rover front the command fail.

(2) If the point its on the good spot, the arm will first, whatever was is last position goes to "Unstow" position.

(3) Then based on the distance and angle between point and the rover arm's attachment point it will put the robot arm in the correct position : arm's attachment -> point distance = head - arm attachment distance then based on Y axis for vertical measure set the correct yaw angle.

(4) Then two possibility :

(A) Make a fake invisible arm (unbreakable and which can't affect the rover by pulling it up, a ghost one who have the same moving characteristic than the real one but way faster) with a spherical hitbox where its size its based on the instrument we have selected) then, cause its supposed to be over the target point, just come down until it hit any object (rock, sand or others) and then send two informations to the rover : where on the hitbox their is a contact and what is the distance that the real arm must travel to touch the objective, then the real arm will simply move its head based on the hit position on the hitbox and slowly put the arm down until he is at some centimeter of the surface and then slowly finish the movement.

(B) Simply measure distance between head and objective, then move down the arm of this distance - a safe distance, at this point, based on the instrument we want to use, measure the relative inclination of surface around the point (player must be sure to target a flat shaped object, like a huge flat rock) then orientate the head at the wanted position, then simply finish the job while moving down the arm and get the correct position based on distance between target and instrument (middle of the range between too far to work and contact distance) then the action its completed.

Of course i don't know at all how to proceed and i know that i have, based on my actual knowledge on coding, really low chances to success.

But anyway it can help Devs to find a "simple" and working solution to fix the "topoint" command for the arm...But i need some informations for try it.

First, it seam logic to me that the Jx (J1, J2...J5) is the robot arm's articulations, but i wish to have the correspondence to know which one correspond to which articulation.

Also i wondering how work the RoboArm_Jx.GenVec[x] system, cause obviously its not angle on percentage that was coded inside this file...

So, if anyone (anyone who know coding or devs) can please give me tutorial about this aspect or any information it will be useful to me, and i will perfectly understand if Dev !

And if their is possibility to make it through a "mods" form rather than a replacement of the original game files i will be happy to know it, but to me it look like a too deep aspect to make a mods from it.

Thanks !

Share this post

Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in

Sign In Now
Sign in to follow this