[SOLVED] Althold last version of firmwares

Post here to get support
Post Reply
Mitteau
Expert
Posts: 248
Joined: Fri Jan 29, 2016 6:00 am

[SOLVED] Althold last version of firmwares

Post by Mitteau »

Hi, completely discouraged.
I downloaded last versions of crazyflie firmware, nrf-firmware, python client.
I use cflib existing in my system.
I compiled and flashed both firmwares. I used cfloader for nrf and python client for main firmware.
I install client with "pip3 install -e ." (I use Xubuntu 16.04)
Everything looks correct.
Cf flies OK.
But when I switch to althold mode, nothing happens. Target window in GUI client remains greyed. Motors of cf keep stopped. The only action is to put motor target to 50%.
I verified parameter "flightmode.althold", it switched to 1. And to 0 when I switch back.
My json file for xbox has not been modified.
Don't understand...
Jean-Claude
Last edited by Mitteau on Thu Sep 21, 2017 7:29 am, edited 1 time in total.
jackemoore
Member
Posts: 75
Joined: Mon Apr 06, 2015 6:47 pm

Re: Althold last version of firmwares

Post by jackemoore »

Hi Jean-Claude,

I encountered the same issue today and you didn't do anything wrong. Your installation procedure in Xubuntu 16.04 appears to almost exactly parallel my installation of the latest GitHub commits (2016.05.12) into Windows 7.

The althold mode is not yet setup correctly in function commanderGetSetpoint() which is within src/modules/src/commander.c. The current code sets thrust to zero and remains in manual mode (not automatic pid update mode and setpoint->position.z is not yet set to sensorData->baro.asl.

For my own playing around, I've modified the code in this function to add these and have looked at various pid values (kp,ki, kd) seeking a smooth altitude hold performance. My next action is to examine the possibility of a better low pass filter applied to the baro.asl values.

I'm assuming Bitcraze is actively working to apply a robust solution to althold and it would be informative if they could provide us a likely completion date.

The latest firmware and matching cfclient is of keen interest to me since the stabilizer functions have been restructured and I would like to add GPS positions to the positionhold mode feature.

Best regards,
Jack
tobias
Bitcraze
Posts: 2339
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: Althold last version of firmwares

Post by tobias »

Yes there is a chance it is not working in the latest commits as the stabilization code has been restructured. We will have a look at it.

[edit]
Issue confirmed an created
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Althold last version of firmwares

Post by arnaud »

It was a silly typo, I fixed the althold problem and closed the ticket.
jackemoore
Member
Posts: 75
Joined: Mon Apr 06, 2015 6:47 pm

Re: Althold last version of firmwares

Post by jackemoore »

Hi Arnaud,
Thanks for correcting althold in crazyflie-firmware-master 2016.05.19 commit. It worked fine for me. Please see my new post under Developer Discussions.
Best regards,
Jack
nanobot9000
Beginner
Posts: 26
Joined: Mon Apr 11, 2016 4:33 pm

Re: Althold last version of firmwares

Post by nanobot9000 »

So this is a little off topic specific to alt hold, but it is something I want to apply to my Crazyflie. I am new to the Crazyflie and have set up the virtualbox, etc and am ready to do some customizing or at least try to learn. I have had limited experience with Eclipse, and I have looked at the tutorial for changing the LED color that is posted under support. I have downloaded the latest master that has the althold fix applied from github and have in on the virtual desktop and am looking for the steps necessary to apply this to my Crazyflie. Is that even necessary or does "Update All Projects" accomplish that?

I opened a new Makefile Project with existing code but not sure that is correct. :?:

Can someone just provide a few steps, like...Click here and select this, if you just want to import and apply new master code without making changes. I was able to change the LED color and flash it with the radio following the steps in the tutorial, but I would greatly appreciate some guidance when there are changes to the master and I want that flashed to my Crazyflie.

If I missed an article or wiki post, I am sorry as I did try to search before posting.

Thanks,
Mitteau
Expert
Posts: 248
Joined: Fri Jan 29, 2016 6:00 am

Re: Althold last version of firmwares

Post by Mitteau »

Hello Nanobot....
I am probably a little "heretic", but I found the VM machine method a little bit complicated and boring. So I am working directly in some dedicated repertory (I have a machine dedicated to Bitcraze, so directory is plainly home dir.). As I use a Linux type system, I created a set of scripts installing the three projects I work on : crazyflie-firmware, crazyflie2-nrf-firmware and Python-client. You can find these scripts underneath:
-------------------
Main script:
#!/bin/sh
./giter_firmware.sh
./giter_nrf.sh
./giter_GUI.sh
-------------------
Script crazyflie_firmware "giter_firmware":
#!/bin/sh
git clone git://github.com/bitcraze/crazyflie-firmware.git
cd crazyflie-firmware
git submodule init
git submodule update
cd ..
-------------------
Script nrf-firmware "giter_nrf":
!/bin/sh
git clone git://github.com/bitcraze/crazyflie2-nrf-firmware.git
cd crazyflie2-nrf-firmware
git submodule init
git submodule update
cd ..
-------------------
Script Python client "giter_GUI":
I have a script to install Ubuntu dependencies "Dep_crazy":
#!/bin/sh
sudo apt-get install python3 python3-pip python3-pyqt4 python3-zmq python3-pyqtgraph
sudo pip3 install pyusb==1.0.0b2
sudo pip3 install appdirs
-------------------
And to install ARM compilation environment "ciloa":
#!/bin/sh
sudo add-apt-repository ppa:terry.guo/gcc-arm-embedded
sudo apt-get update
sudo apt-get install libnewlib-arm-none-eabi
-------------------
Plug-in flight controller and carzyradio (I use crazyradioPA and a hand-made json file for my xbox).
Install GUI client running "pip" install -e ." in client's directory "crazyflie-clients-python".
Make flight firmwares by "make" in the two other directories, according to the wiki instructions ("wiki.bitcraze.io"). The makefile for nrf flashes automaticly nrf-firmware (see README files for instructions). To flash the main firmware (for STM32), I use the dedicated tab in GUI client.
Now, you can play with the source codes...
For any other questions, you can contact me.
Regards
Jean-Claude
(apologize for my scholar English)
Post Reply