PUSH and PULL at same time

Post here to get support
Post Reply
grains123
Beginner
Posts: 2
Joined: Fri Sep 16, 2016 1:50 am

PUSH and PULL at same time

Post by grains123 »

I am somewhat new at programming in Python and was wondering if there is a way to set a socket (port) for PULL and PUSHING at the same time using zmq. I would like to Pull data into a control algorithm and send control data back to the crazyflie. I was trying to do this through the python client, but it appears that only one port (1212) is avaiable at once.

IS there another port for this or is it restricted to push or pull, but not simultaneous?

Thanks!
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: PUSH and PULL at same time

Post by arnaud »

Hi,

The Crazyflie client already has a ZMQ protocol setup to send control data to the Crazyflie. See the documentation there: https://wiki.bitcraze.io/doc:crazyflie: ... q_backends. One of the advantage is that ZMQ will be seen as a normal input device so it is possible to setup the client in teacher/student mode to take-over the flight with a gamepad (very useful when working on autonomous flight!).

With ZMQ we usually open one port per socket so if you want to add one PUSH socket just pick a port and open a socket with it.
Post Reply