extpose()

Discussions about quadcopters/multi-rotors
Post Reply
Amir_94
Beginner
Posts: 12
Joined: Wed May 23, 2018 10:55 pm

extpose()

Post by Amir_94 »

I'm trying to send setpoints to my crazyflie using external position data from Optitrtack using ROS. I was following this post: viewtopic.php?f=6&t=2884&p=16252&hilit=extpos#p16252
and was wondering if you have a sample code using extpose() command. I basically don't know how to configure my data streaming connection in a python script. Before I did it with VRPN_client_ros package using some launch file and I was able to get correct data from Optitrack. Now I'm just curious how I can do the same setup in a python script so I can use cflib and extpose() specifically to give my drone some trajectory.

Thank you all
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: extpose()

Post by arnaud »

I cannot find any simple example. I have been using extpos a couple of time, in one experiment I had a ledring detector implemented with a simple webcam (https://github.com/ataffanel/crazyflie-ledring-detector) and the position of the Crazyflie was sent to the client via ZMQ, in the client I had a custom tab that was receiving position from ZMQ and sending it to the Crazyflie using the extpos message: https://github.com/ataffanel/crazyflie- ... ab.py#L124.

Basically what you need to do is, connect a Crazyflie, setup the position collection using an Optitrack python lib (or sending the position via a socket like I did in my experiment), and then send the extpos message each time you get a position from Optitrack.
Amir_94
Beginner
Posts: 12
Joined: Wed May 23, 2018 10:55 pm

Re: extpose()

Post by Amir_94 »

Thanks Arnaud. Appreciate your help!!
Post Reply