Replies: 1 comment 1 reply
-
Thanks for reaching out! It looks like the issue is that your OptiTrack system isn’t streaming data correctly to the script. First, check that the hostname/IP in the script matches what’s set in Motive. In our script you can test if data is coming in by printing inside send_extpose_quat(), or try an OptiTrack/libmotioncapture example instead. You can also follow OptiTrack’s documentation to make sure streaming is correctly configured. If it still doesn’t work, you may want to check libmotioncapture, which handles the connection. I can’t test this myself since we don’t have OptiTrack at Bitcraze, but I hope this helps! |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I am trying to fly the crazyflie using an Optitrack Mocap system, and this code provided by bitcraze: https://github.com/bitcraze/crazyflie-lib-python/blob/master/examples/mocap/mocap_hl_commander.py
I have modified the code to fit my specific crazyflie and mocap system.
I am running the crazyflie script on a Linux system and the Motive software on Windows. I have Motive running when running the Python script. Initially, the code would run, print how long the sequence should take, and do nothing until I exited the script manually. I added a bunch of print statements in the code to see what was going on. It seems I am able connect to Motive in the Python script but I am not able the get the position of the rigid body I created for the drone.
When I get to line 100 of the provided Python script, that thread gets stuck on the
mc.waitForNextFrame()
, I also printedmc.rigidBodies.items()
mentioned in line 101 and it seems to be an empty list. I just get this outputdict_items([])
.I don't know what I am missing, maybe a setting in the Motive? But streaming is on and the rigid body for the crazyflie is enabled. Just to test I put the wrong rigid body name in the Python script and got the same output.
Any help will be aprreciated, thank you.
Beta Was this translation helpful? Give feedback.
All reactions