NVlabs / curobo

CUDA Accelerated Robot Library
https://curobo.org
Other
798 stars 125 forks source link

timeout in MotionGenPlanConfig not strictly enforced #230

Closed Cfather closed 7 months ago

Cfather commented 7 months ago

Please provide the below information in addition to your issue:

  1. cuRobo installation mode: python
  2. python version: 3.10

Issue Details

I used examples/motion_gen_example.py to test timeout. I change the world yaml (collision_table.yml) that the obstacle is so large that there won't be a feasible solution for whatever start and goal poses. I set timeout in MotionGenPlanConfig to be 10.0 seconds by default. I set max_attempts in MotionGenPlanConfig to be a very large number (1000 or 10000) so that it will keep trying since the problem is always infeasible. Ideally, it should trigger the timeout condition and exit early before it reaches max_attempts. The solve time should approximately be equal to 10.0 seconds. But instead, curobo takes a longer time to return the infeasible result. The output is attached below:

Trajectory Generated:  tensor([False], device='cuda:0') 21.21181082725525 TrajOpt Fail tensor([0.1000, 0.1000], device='cuda:0')

21.21181082725525 is the actual solve time. Other parameters in MotionGenPlanConfig: parallel_finetune=True, enable_finetune_trajopt=True

balakumar-s commented 7 months ago

Can you share the changes you made to collision_table.yml so that we can reproduce this?

balakumar-s commented 7 months ago

We only check if planning time has exceeded timeout after each motion generation attempt. There are two steps inside a motion generation attempt which can have varied compute times, the first is graph planner and second is fine-tuning trajectory optimization.

Since it's not possible to exactly estimate the time taken during these steps, we would have to maintain a planning time instance that we pass around to all planning steps and use this to exit planning when we reach the timeout in any of the steps in a motion generation attempt. We are working on other improvements currently and can revisit this at a later time.

Do share a world model so that we can at least reproduce this.

Cfather commented 7 months ago

Thanks for the reply!

I simply changed the size (dim) to 500, so that the table covers the entire reachable region of the robot.