kristoffer wrote: ↑Mon Nov 13, 2017 1:47 pm
I think that the use of the setpoint_t has been added to over time, and it has become a bit messy. It could probably be improved
The idea is that the setpoint_t describes the desired state of the system, and this include:
* absolute roll/pitch/yaw as used in the standard "manual" flying mode
* roll/pitch/yaw in rate mode as used by some advanced pilots
* a position (x,y,z) to go to, used with absolute positioning systems such as LPS
* a velocity or rate change for x, y, z or roll, pitch, yaw as used with the flow deck
In some cases you want the desired state to be an absolute position or roll angle for instance, while in other cases you are interested in describing a rate of change or velocity. It must also be possible to tell the controller that one parameter of the setpoint is important while another should be ignored.
This is where the mode comes in:
* modeDisable - ignore this paramater
* modeAbs - the desired state is an absolute value
* modeVelocity - the desired state is a rate (or velocity)
Depending on the mode of a parameter, the controller will use different fields in the setpoint_t to get the actual value (setpoint.attitude, setpoint.attitudeRate and so on)
By the way, I can see that you are not on the latest version of the firmware source code. The mode_t struct was renamed to stab_mode_t in June.
Thank you very much. Then I downloaded the latest version of the firmware source code, and replaced the old one in the 'projects' file in VM desktop with the latest one. When I click the hammer icon to build the project, the console shows the message:
10:41:28 **** Build of configuration Default for project crazyflie-firmware ****
make all
ERROR: One or more of the git submodules are not initialized. Try
git submodule init
git submodule update
make: *** [check_submodules] Error 255
10:41:29 Build Finished (took 1s.212ms)
And when I flash using radio, the console shows the message:
10:43:43 **** Build of configuration Default for project crazyflie-firmware ****
make cload
python3 -m cfloader flash cf2.bin stm32-fw
Restart the Crazyflie you want to bootload in the next
10 seconds ...
done!
Connected to bootloader on Crazyflie 2.0 (version=0x10)
Target info: nrf51 (0xFE)
Flash pages: 232 | Page size: 1024 | Buffer pages: 1 | Start page: 88
144 KBytes of flash available for firmware image.
Target info: stm32 (0xFF)
Flash pages: 1024 | Page size: 1024 | Buffer pages: 10 | Start page: 16
1008 KBytes of flash available for firmware image.
Traceback (most recent call last):
File "/home/bitcraze/projects/crazyflie-clients-python/src/cfloader/__init__.py", line 179, in main
bl.flash(filename, targetnames)
File "/home/bitcraze/projects/crazyflie-lib-python/cflib/bootloader/__init__.py", line 191, in flash
f = open(filename, 'rb')
FileNotFoundError: [Errno 2] No such file or directory: 'cf2.bin'
[Errno 2] No such file or directory: 'cf2.bin'
10:43:46 Build Finished (took 3s.499ms)
I suspect that the way of replacing the old version of firmware source code is wrong. Could you tell me the proper way? Thank you.