Problem uploading the trajectory to the autonomous_sequence_high_level.py.

Discussions about autonomous flight in general, regardless of positioning method
Post Reply
rago7
Beginner
Posts: 2
Joined: Mon Nov 08, 2021 12:55 pm

Problem uploading the trajectory to the autonomous_sequence_high_level.py.

Post by rago7 »

Hello,

I'm trying to run the autonomous_sequence_high_level.py with a polynomial trajectory generated with the uav_trajectory, but when I run the code I get the next error:

Code: Select all

Connecting to radio://0/80/2M
Connected to radio://0/80/2M
Uploading data
Traceback (most recent call last):
  File "autonomous_sequence_high_level.py", line 221, in <module>
    duration = upload_trajectory(cf, trajectory_id, figure8)
  File "autonomous_sequence_high_level.py", line 172, in upload_trajectory
    upload_result = Uploader().upload(trajectory_mem)
  File "autonomous_sequence_high_level.py", line 84, in upload
    write_failed_cb=self._upload_failed)
TypeError: write_data() got an unexpected keyword argument 'write_failed_cb'
I have checked the lenght of the trajectory and everything seems fine, any idea of how to correct this error?

The trajectory used is the following:

Code: Select all

# Duration,x^0,x^1,x^2,x^3,x^4,x^5,x^6,x^7,y^0,y^1,y^2,y^3,y^4,y^5,y^6,y^7,z^0,z^1,z^2,z^3,z^4,z^5,z^6,z^7,yaw^0,yaw^1,yaw^2,yaw^3,yaw^4,yaw^5,yaw^6,yaw^7
figure8 = [
   
[4.000000,0.589063,0.000000,-0.000000,-0.004911,0.009828,-0.006006,0.001477,-0.000128,0.193321,0.000000,-0.000000,-0.012426,0.013944,-0.005822,0.001065,-0.000072,0.033602,-0.000000,0.000000,0.114971,-0.084421,0.024708,-0.003198,0.000148,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000],
# noqa
[4.000000,0.591404,-0.006160,-0.042816,-0.066130,0.187720,-0.106394,0.022798,-0.001696,0.187397,-0.001931,0.003310,-0.003362,0.028349,-0.016599,0.003551,-0.000265,0.404017,0.123323,-0.012757,-0.051193,0.034822,-0.010324,0.001522,-0.000091,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000],
# noqa
[4.000000,0.344652,-0.219351,0.157781,-0.103693,0.138984,-0.067086,0.012914,-0.000884,0.488076,0.106046,0.007999,-0.030793,0.027924,-0.011060,0.002025,-0.000140,0.501396,0.003277,-0.005918,-0.013991,0.021827,-0.010559,0.002149,-0.000159,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000],
# noqa
[4.000000,0.647027,-0.235211,-0.105306,-0.007191,0.084756,-0.033382,0.004731,-0.000227,0.889512,0.105266,0.002150,-0.017544,0.016311,-0.006207,0.001062,-0.000067,0.499734,0.006598,0.001289,-0.026125,0.028361,-0.012261,0.002376,-0.000172,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000],
# noqa
[4.000000,0.728248,0.093861,-0.141645,0.026386,-0.114216,0.085890,-0.021505,0.001786,1.287086,0.102721,0.013152,0.005535,-0.030830,0.020611,-0.005093,0.000430,0.500684,0.007531,-0.002636,-0.030253,0.035578,-0.015451,0.002946,-0.000208,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000],
# noqa

]
jonasdn
Expert
Posts: 132
Joined: Mon Mar 01, 2021 3:13 pm

Re: Problem uploading the trajectory to the autonomous_sequence_high_level.py.

Post by jonasdn »

Hello rago7!

Could you make sure you have the latest version of the library (cflib) installed? It looks like it is a version that does not support the "write_failed_cb" argument to write_data.

You can check your current installed version by: $ pip show cflib
rago7
Beginner
Posts: 2
Joined: Mon Nov 08, 2021 12:55 pm

Re: Problem uploading the trajectory to the autonomous_sequence_high_level.py.

Post by rago7 »

Hi, I just checked the version and is the 0.1.12.1, Do you know which version support the "write_failed_cb"?
jonasdn
Expert
Posts: 132
Joined: Mon Mar 01, 2021 3:13 pm

Re: Problem uploading the trajectory to the autonomous_sequence_high_level.py.

Post by jonasdn »

Hi!

No, not at the top of my head, but you should strive to always have the latest version of the library installed. So try to upgrade it using pip install or yse the latest VM from bitcraze: https://github.com/bitcraze/bitcraze-vm/releases/

And follow instructions from: https://www.bitcraze.io/documentation/t ... ualmachine
Post Reply