Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

Motion planning: RuntimeError: Start Configuration is infeasible #45

#1

When trying to set up a simple motion planner I always get this error:
RuntimeError: Start configuration is infeasible
even when the start config (qinit) = default robot config (all zeros)
So I tried the demo "planning_test.py" found in the Python3/demos directory but got the same error.

######################################### klampt.vis: Dialog done on window 1 ######################################### vis.dialog(): ... dialog done GLPluginProgram.pushPlugin called after window was initialized, some actions may not be available Returning from editor to old window 0 vis.editors.run(): Result True return value [[0.0, 0.33960574545980493, -2.1964686754911353, -0.7687452944315742, -3.0961843026414138, -0.9222354690056318, -0.12690989085665472, 0.0, 0.0, 0.0], [0.0, -0.38062767544857723, -0.8228674393267199, -2.5774453267190305, -0.012832840531500514, -0.562650944925845, 0.8058588150306663, 0.0, 0.0, 0.0], [0.0, -0.322686574440482, 0.3914601754648459, -3.1636002671487673, 1.0599618680213916, -1.6798794779356159, 0.1980007194963125, 0.0, 0.0, 0.0]] Creating plan... ######### QGLWidget setProgram ############### Traceback (most recent call last): File "/home/benoit/Desktop/motion-planner/klampt_env/library_examples/Python3/demos/planning_test.py", line 155, in <module> plan.setEndpoints(configs[i],configs[i+1]) File "/usr/local/lib/python3.10/dist-packages/Klampt-0.9.0-py3.10-linux-x86_64.egg/klampt/plan/cspace.py", line 342, in setEndpoints self.planner.setEndpoints(start,goal) File "/usr/local/lib/python3.10/dist-packages/Klampt-0.9.0-py3.10-linux-x86_64.egg/klampt/plan/motionplanning.py", line 873, in setEndpoints return _motionplanning.PlannerInterface_setEndpoints(self, start, goal) RuntimeError: Start configuration is infeasible Visualization thread closing and cleaning up Qt... ######### QGLWidget close ############### ######### QGLWidget close ############### QObject::~QObject: Timers cannot be stopped from another thread

  • replies 8
  • views 104
  • likes 1
#2

Typically this is caused by your URDF having some self collisions at the zero configuration. I suggest building the RobotTest app, then opening your URDF. If you check the “Self Collisions” box it will highlight self colliding links in red. You can also print the self colliding links using the button next to that checkbox, and get some text to copy and paste into the tag under the URDF to ignore those false positive self collisions.

#3

Hi,
I have build the klampt lib from source and used the RobotTest app as you mentioned and I do see the collisions. But I'm not able to get the self colliding links as you mentioned. I tried with a URDF file and with a ROB file but both don't give me anything. Am I doing something wrong?
here you can find screenshots with the commands I used:

../klampt/bin/RobotTest robots/irb2600.urdf
urdf collision

../klampt/bin/RobotTest robots/irb2600.urdf
both rob collision

#4

That's strange. Can you try setting DO_SIMPLIFY=0 at the top and wrapping plan.setEndpoints(...) in a try/catch block as follows:

try:
    plan.setEndpoints(configs[i],configs[i+1])
 except RuntimeError:
    #one of the configurations must be infeasible
    failed_start = [name for (test,name) in zip(plan.space.feasibilityTests,plan.space.feasibilityTestNames) if not(test(configs[i]))]
    failed_goal = [name for (test,name) in zip(plan.space.feasibilityTests,plan.space.feasibilityTestNames) if not(test(configs[i+1]))]
    print("Start configuration failed tests:",','.join(failed_start))
    print("Goal configuration failed tests:",','.join(failed_goal))
    raise
#6

Hi,
Is there any documentation that explains how the planning_test script works?
I can´t seen to figure out what the "editing plan config" windows do and what the point is of the "editing IK solved configs" windows...
I did edit the code as you asked but because I don't seem to understand how the script works, I always get different errors:

=============================================================================
Start configuration failed tests: closed loop constraint
Goal configuration failed tests: closed loop constraint
=============================================================================
RuntimeError: Start configuration is infeasible
=============================================================================
Start configuration failed tests: 
Goal configuration failed tests: closed loop constraint
=============================================================================
RuntimeError: Goal configuration is infeasible
Failed to generate a plan

Could you also please check my other github issue regarding the robotplanning wizard?

Kind regards,
Benoît

coming back to the RobotTest program showing collision lines on the robot arm, I tried the ur5.rob file from the library and here you can also see red lines.

  • Are those red lines (first image) indicating that there are collisions or are there only collisions when the visual parts of the robot are red (second image) ?

Screenshot from 2022-05-10 10-33-42.png Screenshot from 2022-05-10 10-35-45.png
#8

Ah, the planning_test.py has a bunch of flags at the top of the file to test more complex version of the motion planning functions, and these were set to 1 in the committed version. They should be set to 0. If you git pull, the most recent planning_test.py will hopefully be more clear.

The red lines in RobotTest indicate the self collision tests that would be run when calling robot.selfCollides() or using the standard motion planning functions. In the second image the robot has a number of links that are already self colliding (red), so this suggests that you should Print Collisions and copy the results into the URDF.

I'll get back to the wizard at some point -- that code is definitely incomplete and should probably be removed for now.

#9

Hi,
Thanks a lot for the clarification! I will pull the latest version and check that out! Regarding the wizard, it's good to know that it is not done yet, so I don't have to scratch my head about that problem anymore.

Kind regards,

Benoît

Hi,

Is the CLOSED_LOOP_TEST functionality of the planning_test.py script working correctly or is it also still being developed? If it is in fact not finished, is there any other way to setup a motion planner with multiple constraints?

The problem I'm facing right now:

Instead of setting a coordinate as a ik.objective as showed in the example script:

obj = ik.objective(robot.link(robot.numLinks()-1),local=[0,0,0],world=[0.5,0,0.5])

I would like to constraint the angle of the endeffector like this:

obj = ik.objective(robot.link(linkindex),R=so3.from_axis_angle(([0,1,0],(toolAngle*(math.pi/180)))),t=t)

But this doesn´t seem to be working (while it does work when just setting up IK).

Kind regards,

Benoît Lagasse