Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Path following script with the PythonAPI
I used the "Curve Follow Project" to create a path that my robot could follow.
I then used the Generic Post Processor to export the path and converted the path to using the RoboDK Python API.

The Path that was generated by the "Curve Follow Project. was a movej followed by a bunch of movel commands and the robot successfully moves through the path (at different simulation speeds).

I did a 1:1 copy of the exported path to using the Python API (also starting with a MoveJ), and about 10% of the way through the path I got a reach error.

It looks like the system picks different joint configurations while the robot is going through the path if I'm running the system through the RoboDK application and the python api commands.

1. Is there an easy way to export everything as a robodk python api program (is there a post processor that already does this?)
2. Is there any reason that I should be seeing the difference between running the program in the frontend and via the python api (python example below)?

robot.setPoseTool(Pose(0.000000, -39.484000, 71.107000, 40.000000, 0.000000, 0.000000))
robot.setPoseFrame(Pose(0.000, 0.000, 0.000,  -0.000, 0.000, -0.000))

robot.MoveJ(Pose(480.240906, -29.733795, 104.607483, -180.000000, -0.000000, -22.194104))
robot.MoveL(Pose(447.225937, -9.836212, 104.607483, 180.000000, -0.000000, -22.194104))
robot.MoveL(Pose(481.757000, 10.000000, 104.607000, 179.999580, -0.000082, -22.194245))

For question 1, you can use the Quine post processor.

For question 2, ideally you shouldn't, but you can send me your station and I can take a look.

Users browsing this thread:
1 Guest(s)