meco-group / omg-tools

Optimal Motion Generation-tools: motion planning made easy
GNU Lesser General Public License v3.0
565 stars 98 forks source link

AttributeError: 'AGV' object has no attribute 'trajectories' #69

Closed rena-ganba closed 6 years ago

rena-ganba commented 6 years ago

Dear all, When I try to run the p2p_agv.py in Examples, I face the error:

AttributeError: 'AGV' object has no attribute 'trajectories'

It also occurs on Trailer and Bicycle. Is there any workaround or solution for that?

Thank you very much

timmercy commented 6 years ago

Hi!

Which branch are you using? Does the error occur immediately, or only after some time? I just checked, and for me this example works fine on the Master branch.

Kind regards,

Tim

rena-ganba commented 6 years ago

Hi,

I use master branch. My system is python 2.7.6 on Ubuntu 16.04. I install omg-tools using

sudo pip install omg-tools

which install omg-tools-0.1.3. Then the error message is like this

rikudou@rikudou-PU301LA:~/Documents/omg-tools/examples$ python p2p_trailer.py 
Building nlp ...  in 5.512335 s
Invalid_Option
----|------------|------------
 It |      t upd |       time 
----|------------|------------
  1 | 1.6220e-03 | 0.0000e+00 
Traceback (most recent call last):
  File "p2p_trailer.py", line 62, in <module>
    simulator.run()
  File "/usr/local/lib/python2.7/dist-packages/omgtools/execution/simulator.py", line 43, in run
    stop = self.update()
  File "/usr/local/lib/python2.7/dist-packages/omgtools/execution/simulator.py", line 94, in update
    self.deployer.update(self.current_time)
  File "/usr/local/lib/python2.7/dist-packages/omgtools/execution/deployer.py", line 78, in update
    trajectories[str(vehicle)] = vehicle.trajectories
AttributeError: 'Trailer' object has no attribute 'trajectories'

It only appears for AGV, Trailer, Bicycle, but for holonomic and quadrotor, it is no problem.

timmercy commented 6 years ago

The real problem is the 'invalid option' message, this is because you probably left the option to use ma57. But this is a solver that is not installed by default. If you remove this option, the problem will probably run. However, because of the complexity of the problem, it may be that the problem doesn't solve properly without ma57.

I hope this helps you out!

rena-ganba commented 6 years ago

You are right. After I remove out the ma57 option, the problem runs well (eventhough very slow).

Thank you very much for your assistance. For anyone facing the same issue, it is the time for getting ma 57.

EdXian commented 5 years ago

Hi @rena-ganba , I have the same problem. The example works if i cancel out the ma57 solver. However, I dont know how to install the ma57. Could you help me?

Thank you very much!!

rubenvanparys commented 5 years ago

Hi @EdXian ma57 is part of the set of HSL solvers. Instructions to install them are found here. When leaving out ma57 as option, you use ipopt default linear solver which is mumps. This is perfectly fine as well, but it's just a bit slower.