Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Z ranger and Lighthouse Deck error #8

Open
varadVaidya opened this issue Sep 27, 2024 · 0 comments
Open

Z ranger and Lighthouse Deck error #8

varadVaidya opened this issue Sep 27, 2024 · 0 comments

Comments

@varadVaidya
Copy link

varadVaidya commented Sep 27, 2024

Hello, thanks for open sourcing the your firmware. I am currently working on building a controller that takes thrust and torques as a setpoint and want to use your firmware as a reference implementation. I am trying to load the firmware and get the following error by trying to connect to crazyflie using cfclient

Error log after connecting via cfclient
INFO:cfclient.gui:Disabling STL printouts
INFO:cfclient.utils.input.inputreaders:Input readers: ['linuxjsdev', 'pysdl2']
INFO:cfclient.utils.input.inputreaders:Successfully initialized [linuxjsdev]
INFO:cfclient.utils.input.inputreaders:Could not initialize [pysdl2]: No SDL2 support on Linux
INFO:cfclient.utils.input.inputinterfaces:Found interfaces: ['leapmotion', 'wiimote', 'zmqpull']
INFO:cfclient.utils.input.inputinterfaces:Could not initialize [leapmotion]: Leap Motion library probably not installed (No module named 'leapsdk')
INFO:cfclient.utils.input.inputinterfaces:Could not initialize [wiimote]: Missing cwiid (wiimote) driver No module named 'cwiid'
INFO:cfclient.utils.config:Dist config read from /home/varad/venv/cf2swarm/lib/python3.10/site-packages/cfclient/configs/config.json
INFO:cfclient.utils.config:Config file read from [/home/varad/.config/cfclient/config.json]
INFO:cfclient.utils.input.inputinterfaces:Could not initialize [zmqpull]: ZMQ input disabled in config file
INFO:OpenGL.acceleratesupport:No OpenGL_accelerate module loaded: No module named 'OpenGL_accelerate'
INFO:cfclient.utils.zmq_led_driver:ZMQ led disabled in config file
INFO:cfclient.utils.zmq_param:ZMQ param disabled in config file
INFO:cfclient.gui:If startup fails because of "xcb", install dependency with `sudo apt install libxcb-xinerama0`.
INFO:cfclient.utils.input:Using device blacklist [(VirtualBox|VMware)]
INFO:cflib.crtp.radiodriver:v99.55 dongle with serial N/A found
INFO:cflib.drivers.cfusb:Looking for devices....
INFO:cflib.crtp.prrtdriver:Initialized PRRT driver.
INFO:cflib.crazyflie:Callback->Connection initialized[radio://0/80/2M]
INFO:cflib.crazyflie:We are connected[radio://0/80/2M], request connection setup
INFO:cflib.crazyflie.platformservice:Request _request_protocol_version()
INFO:cflib.crazyflie:Callback->Connected to [radio://0/80/2M]
INFO:cflib.crazyflie.platformservice:_crt_service_callback
INFO:cflib.crazyflie.platformservice:Request protocol version
INFO:cflib.crazyflie.platformservice:_platform_callback
INFO:cflib.crazyflie.platformservice:Protocol version (platform): 5
INFO:cflib.crazyflie.toc:TOC for port [5] found in cache
INFO:cflib.crazyflie:Log TOC finished updating
INFO:cflib.crazyflie.mem:5 memories found
INFO:cflib.crazyflie:Memories finished updating
INFO:cflib.crazyflie.toc:TOC for port [2] found in cache
INFO:cflib.crazyflie:Param TOC finished updating
INFO:cflib.crazyflie:Callback->Connection setup finished [radio://0/80/2M]
INFO:cfclient.utils.logconfigreader:Parsing [stabilizer.json]
INFO:cfclient.utils.logconfigreader:Parsing [Stabilizer.json]
WARNING:cflib.crazyflie.toc:Unable to find variable [supervisor.info]
INFO:cflib.crazyflie.log:Have successfully started logging for id=1
INFO:cflib.crazyflie.log:Have successfully started logging for id=4
INFO:cflib.crazyflie.log:Have successfully started logging for id=5
INFO:cflib.crazyflie:All parameters updated
===== 2024.09.27 11:09:25 =====
INFO:cflib.crazyflie:Callback->Connection completed [radio://0/80/2M]
ERROR:cflib.crazyflie:Exception while doing callback on port [2]

Traceback (most recent call last):
  File "/home/varad/venv/cf2swarm/lib/python3.10/site-packages/cflib/crazyflie/__init__.py", line 415, in run
    cb.callback(pk)
  File "/home/varad/venv/cf2swarm/lib/python3.10/site-packages/cflib/crazyflie/param.py", line 649, in _new_packet_cb
    self.updated_callback(pk)
  File "/home/varad/venv/cf2swarm/lib/python3.10/site-packages/cflib/crazyflie/param.py", line 229, in _param_updated
    self.all_updated.call()
  File "/home/varad/venv/cf2swarm/lib/python3.10/site-packages/cflib/utils/callbacks.py", line 54, in call
    cb(*args)
  File "/home/varad/venv/cf2swarm/lib/python3.10/site-packages/cfclient/ui/tabs/FlightTab.py", line 730, in _all_params_updated
    self._populate_assisted_mode_dropdown()
  File "/home/varad/venv/cf2swarm/lib/python3.10/site-packages/cfclient/ui/tabs/FlightTab.py", line 810, in _populate_assisted_mode_dropdown
    if int(self._helper.cf.param.values["deck"]["bcZRanger"]) == 1:
KeyError: 'bcZRanger'

Traceback (most recent call last):
  File "/home/varad/venv/cf2swarm/lib/python3.10/site-packages/cfclient/ui/tabs/lighthouse_tab.py", line 391, in _connected
    if self._helper.cf.param.get_value('deck.bcLighthouse4') == '1':
  File "/home/varad/venv/cf2swarm/lib/python3.10/site-packages/cflib/crazyflie/param.py", line 381, in get_value
    return self.values[group][name]
KeyError: `'bcLighthouse4`

I dont't have a Z-ranger deck and neither the lighthouse system. We have Qualysis Motion Capture system, and both active and/or passive marker decks and FlowDeckv2 to go with it, and wish to use those instead to run this firmware. I am new to the crazyflie ecosystem and thus confused on how to disable these within your firmware. One option I see is to just use the out-of-tree controller pieces and the corresponding function and structure definitions in stabiliser.h and use it with default firmware.

But is there any simpler way to just disable these two decks and work with your firmware?

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant