Hello everyone , I m facing a problem ... I want to make a programm which asks the User the places where he wants the ROBOT to visit via a message box. So far I've made the message box and all the things that i want the robot to do , but I don't know the command which sets the Target manually .Does anyone have a clue ?
Thread Rating:
Python example to update robot targets |
04-02-2024, 04:27 PM
What do you mean by setting the Target manually?
You can move the target by using setPose.
04-03-2024, 08:17 AM
I want the User to control the robot without using the set target method that we normally use to set targets. For example while running the python script a message box will ask you how many targets you want to have and where are it should go next? So you will insert the the next target (X,Y,Z Values).Can thiss "setPose" command do that?
04-04-2024, 10:19 AM
Yes, you can create targets by using AddTarget. Then, you can use setPos on a pose to update the XYZ position of the target pose. Finally, you should use setPose to update the pose on the target in your project.
I recommend you to take a look at this example: https://robodk.com/doc/en/PythonAPI/exam...to-program And more precisely this section: Code: # Retrieve the reference target:
06-28-2024, 01:52 AM
(This post was last modified: 06-28-2024, 02:14 AM by juniorloureiro.)
Hello, I have almost the same doubt. But I want to change only the Z pos....
Im drawing some glue points at a ceramic tiles and some time the Teach Target To Surface do some mistakes by getting downside of the tiles. And cause of that I'm clicking F3 to every 210 targets and then changing Z pos by hand. What can I use on RoboDK API to change that? I made something like that Code: print('Targets in the station:') BTW But Im getting error when try to update target pose. API returns that in_target dosent have SetPoseAbs thanks; Best Regards
06-28-2024, 09:51 AM
Code: in_target.SetPoseAbs(pose2) #Update Target setPoseAbs - the first letter in the name of this function is not capitalized https://robodk.com/doc/en/PythonAPI/robo...setPoseAbs
06-29-2024, 01:17 AM
(06-28-2024, 09:51 AM)Sergei Wrote:Thanks! I figured it out today when I rewrite the code! Many thanks ! |
Users browsing this thread: |
1 Guest(s) |
Copyright © 2024 RoboDK Inc.
Powered by MyBB