RoboDK Forum
Api c# Point Follow Project- Printable Version

+- RoboDK Forum (//www.sinclairbody.com/forum)
+-- Forum: RoboDK (EN) (//www.sinclairbody.com/forum/Forum-RoboDK-EN)
+--- Forum: RoboDK API (//www.sinclairbody.com/forum/Forum-RoboDK-API)
+--- Thread: Api c# Point Follow Project (/Thread-Api-c-Point-Follow-Project)



Api c# Point Follow Project-amartinmestres-03-11-2021

Hello , can I access to the points of a point follow projects one by one (like individual targets) from de c# api?
Thanks!


RE: Api c# Point Follow Project-Jeremy-03-15-2021

Hi Amartinmestres,

You'll have to clarify your question a bit.

If you didn't create a Curve Follow Project (CFP) the points are available from "GetPoints"://www.sinclairbody.com/doc/en/PythonAPI/robolink.html#robolink.Item.GetPoints

If your CFP is already created and updated, you can extract the target from the created program. If you right-click the program in the UI and select "show instruction" you will see all the instructions.
You can then select any Move, right-click and "select target" to extract the target. The same data should be available from the API I believe.

Jeremy


RE: Api c# Point Follow Project-amartinmestres-03-15-2021

Ok thanks


RE: Api c# Point Follow Project-Jeremy-03-15-2021

Hi Amartinmertres,

According to the documentation, MoveJ and MoveL accept 3 types of positional information.//www.sinclairbody.com/doc/en/PythonAPI/robolink.html#robolink.Item.MoveL
1 - A target
2 - List of joints
3 - 4X4 matrix

So something like
prog.MoveL(Pose) should be enough. No need to create the target itself.

According to this example (//www.sinclairbody.com/doc/en/PythonAPI/examples.html#modify-program-instructions), you can feed that information directly to the Move in your program.

Code:
elif instruction_dict['Type'] == INS_TYPE_MOVE:
print("Move instruction: use setInstruction to modify target")
#ins_name, ins_type, move_type, isjointtarget, pose, joints = prog.Instruction(ins_id)
#prog.setInstruction(ins_id, ins_name, ins_type, move_type, isjointtarget, pose, joints)



RE: Api c# Point Follow Project-amartinmestres-03-15-2021

In the link you sent it's say
"Move a robot to a specific target (“Move Joint” mode). This function waits (blocks) until the robot finishes its movements. If this is used with a program item, a new joint movement instruction will be added to the program. Important note when adding new movement instructions to programs:only target items supported, not poses"

I can't add a instructions with a pose only with a item traget and it's too slow


RE: Api c# Point Follow Project-Jeremy-03-15-2021

Hi There,

Sorry for that.

Have you try turning down the render before starting your script and turning it on again afterward?

RDK.Render(False)

(Code)
(You need to add RDK.Update() after you move a target or an object)


RDK.Render(True)