question

Leandro Meirelles avatar image
0 Likes"
Leandro Meirelles asked Jason Lightfoot commented

Standard robot kinematics information

Hi,

I got a model that a robot load flow items from 1 queue and delivery to 16 processors around him.

But I need to do step by step by coding, so I need the command that moves the robot from home to load position in a specific time (but doesn't load the unit, just move to the queue location, just kinematics).

Since the kinematics already exist, do I need to use the addkinematics()? And to get the joints angles for each of the 16 deliveries I need to do it manually first and and at each event I need to check the angles on object tree? is there a easier way to do that?

Follow model attached, I am at code line 35.

Test02.fsm

FlexSim 24.1.1
kinematics
test02.fsm (51.7 KiB)
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered Jason Lightfoot commented

Adding kinematics to the relevant nodes would probably be possible but require reading up on inverse kinematics to be able to determine the joint positions based on the target location.

1721371873135.png

There are two task types you can use instead through:

If you want to move to the location of an item, as if picking it up, you can use a PickOffset task.

To move to arbitraty coordinates you can use the TravelToLoc task.

In both cases you can set the move time property before the task is started to make the motion take the correct amount of time.

https://docs.flexsim.com/en/24.0/Reference/TaskSequences/QuickReference/QuickReference.html

// Example for travel to loc task
Object box15 = Model.find("Box 15");
Vec3 box15Loc = box15.getLocation(0.5, 0.5, 0.5); TaskExecuter robot = Model.find("Robot"); robot.setProperty("MoveTime", 7.3); TaskSequence TS = TaskSequence.create(robot, 0, 0); TS.addTask(TASKTYPE_TRAVELTOLOC, NULL, NULL, box15Loc.x, box15Loc.y, box15Loc.z, 0); TS.dispatch();

Is there a particular reason why you try to code everything in the Run Start trigger? I would suggest to use Process Flow and have a token loop through the table, wait until the event time, then trigger the respective action. Would likely be easier to follow and debug.


1721371873135.png (27.5 KiB)
· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Jason Lightfoot avatar image Jason Lightfoot ♦♦ commented ·

Have you looked at defining robot motion paths?

0 Likes 0 ·