gtfactslab / CrazySim

A Crazyflie simulator for testing CFLib Python code, ROS 2 nodes through Crazyswarm2, custom crazyflie-firmware modules, or perform a flight demo on the crazyflie-python-client.
GNU General Public License v3.0
71 stars 15 forks source link

cfclient stuck connecting #17

Open H1ghBre4k3r opened 1 week ago

H1ghBre4k3r commented 1 week ago

Hey everyone!

I followed the installation instructions to the point where I start the simulation via

bash tools/crazyflie-simulation/simulator_files/gazebo/launch/sitl_singleagent.sh -m crazyflie -x 0 -y 0

Then, I start cfclient, click on Scan and the address of the crazyflie pops up (udp://0.0.0.0:19850). However, when I click on Connect, the client is completely stuck.

In the logs of the simulation, I can see

[Msg] Received CfLib handshake message...

and the client shows

INFO:cflib.crtp.udpdriver:Initialized UDP driver.
INFO:cflib.crtp.prrtdriver:Initialized PRRT driver.
INFO:cflib.crazyflie:Callback->Connection initialized[udp://0.0.0.0:19850]
INFO:cflib.crtp.udpdriver:Initialized UDP driver.
INFO:cflib.crazyflie:We are connected[udp://0.0.0.0:19850], request connection setup
INFO:cflib.crazyflie.platformservice:Request _request_protocol_version()

After that, nothing happens and I have to kill the client via the terminal.

My setup is: Ubuntu 22.04 (for ARM) Python 3.10 Gazebo Garden

Thanks a lot for your help!

llanesc commented 1 week ago

That's strange behavior I haven't seen before. Are you using the modified client https://github.com/llanesc/crazyflie-clients-python with branch sitl-release? If you have the official one installed then you need to uninstall it first. What is your real time factor in Gazebo?