It appears that changes in control parameters (and other CAT_USER) settings do not affect the drone.
When running ardrone_driver, the following is printed:
Wait authentification
===================+> 192.168.1.1
[ INFO] [1352234370.655983884]: Root Frame is: 0
[ INFO] [1352234370.656905814]: No values found for `~cov/imu_la` in parameters, set all to zero.
[ INFO] [1352234370.657902223]: No values found for `~cov/imu_av` in parameters, set all to zero.
[ INFO] [1352234370.658896658]: No values found for `~cov/imu_or` in parameters, set all to zero.
[ INFO] [1352234370.663244082]: SET ~bitrate_ctrl_mode : 0.00
[ INFO] [1352234370.664260742]: SET ~max_bitrate : 2000.00
[ INFO] [1352234370.665207506]: SET ~outdoor : 1.00
[ INFO] [1352234370.666118191]: SET ~flight_without_shell : 1.00
[ INFO] [1352234370.667830458]: SET ~altitude_max : 5000.00
[ INFO] [1352234370.668715842]: SET ~altitude_min : 100.00
[ INFO] [1352234370.670661813]: SET ~enemy_colors : 3.00
[ INFO] [1352234370.671968513]: SET ~enemy_without_shell : 0.00
[ INFO] [1352234370.673430208]: SET ~control_vz_max : 2000.00
[ INFO] [1352234370.674487957]: SET ~control_yaw : 350.00
[ INFO] [1352234370.675655010]: SET ~euler_angle_max : 0.50
[ INFO] [1352234370.676419481]: SET ~bitrate : 2000.00
[ INFO] [1352234370.677528147]: SET ~navdata_demo : 0.00
[ INFO] [1352234370.678744205]: SET ~detect_type : 10.00
[ INFO] [1352234370.679771770]: SET ~detections_select_h : 32.00
[ INFO] [1352234370.680836172]: SET ~detections_select_v_hsync : 4.00
Input device Teleop added
Starting thread video_stage
Starting thread video_recorder
Starting thread update_ros
video stage thread initialisation
Video multisocket : init 2 sockets
Video multisocket : connecting socket 0 on port 5555 UDP
Video multisocket : connecting socket 1 on port 5555 TCP
Thread `update_ros` started
Video recorder thread initialisation
Set IP_TOS ok
Starting thread navdata_update
Starting thread ardrone_control
Thread navdata_update in progress...
PA : MEMORY SPACE ALLOWED : 40 MB
Start thread thread_academy
Start thread thread_academy_upload
Start thread thread_academy_download
Academy download stage resumed
Academy download stage paused
Timeout when reading navdatas - resending a navdata request on port 5554
Academy download stage resumed
Academy download stage paused
Sending default CAT_SESSION settings
[ INFO] [1352234375.681546174]: Successfully connected to 'My ARDrone' (AR-Drone 2.0 - Firmware: 2.1.20) - Battery(%): 57
Investigating the drone's configuration files (see next code snippet) shows that the CAT_SESSION values (for example detect_type, detections_select_h, detections_select_v_hsync) are correctly set (as implied by the driver output), but custom CAT_USER settings are not set. The type of each parameter can be read in config_keys.h
.
CAT_SESSION parameters correctly set
# pwd
/data/custom.configs/sessions
# cat config.7bc641ad.ini
[control]
flying_mode = 0
hovering_range = 1000
[video]
codec_fps = 30
video_codec = 129
max_bitrate = 2000
video_channel = 0
[detect]
groundstripe_colors = 16
detect_type = 10
detections_select_h = 32
detections_select_v_hsync = 4
detections_select_v = 0
[userbox]
[gps]
latitude = 5.0000000000000000e+02
longitude = 5.0000000000000000e+02
altitude = 0.0000000000000000e+00
[custom]
application_id = e182b69b
profile_id = 00000000
session_id = 7bc641ad
session_desc = Session 7bc641ad
But CAT_USER not?
# cd ../profiles/
# ls
There are no user profiles created by the application.
Further debugging by setting #define _GENERAL_NAVDATA_DEBUG (1)
in ardrone_general_navdata.c
produces the following output on driver startup:
Wait authentification
===================+> 192.168.1.1
[ INFO] [1352234370.655983884]: Root Frame is: 0
[ INFO] [1352234370.656905814]: No values found for `~cov/imu_la` in parameters, set all to zero.
[ INFO] [1352234370.657902223]: No values found for `~cov/imu_av` in parameters, set all to zero.
[ INFO] [1352234370.658896658]: No values found for `~cov/imu_or` in parameters, set all to zero.
[ INFO] [1352234370.663244082]: SET ~bitrate_ctrl_mode : 0.00
[ INFO] [1352234370.664260742]: SET ~max_bitrate : 2000.00
[ INFO] [1352234370.665207506]: SET ~outdoor : 1.00
[ INFO] [1352234370.666118191]: SET ~flight_without_shell : 1.00
[ INFO] [1352234370.667830458]: SET ~altitude_max : 5000.00
[ INFO] [1352234370.668715842]: SET ~altitude_min : 100.00
[ INFO] [1352234370.670661813]: SET ~enemy_colors : 3.00
[ INFO] [1352234370.671968513]: SET ~enemy_without_shell : 0.00
[ INFO] [1352234370.673430208]: SET ~control_vz_max : 2000.00
[ INFO] [1352234370.674487957]: SET ~control_yaw : 350.00
[ INFO] [1352234370.675655010]: SET ~euler_angle_max : 0.50
[ INFO] [1352234370.676419481]: SET ~bitrate : 2000.00
[ INFO] [1352234370.677528147]: SET ~navdata_demo : 0.00
[ INFO] [1352234370.678744205]: SET ~detect_type : 10.00
[ INFO] [1352234370.679771770]: SET ~detections_select_h : 32.00
[ INFO] [1352234370.680836172]: SET ~detections_select_v_hsync : 4.00
Input device Teleop added
Starting thread video_stage
Starting thread video_recorder
Starting thread update_ros
video stage thread initialisation
Video multisocket : init 2 sockets
Video multisocket : connecting socket 0 on port 5555 UDP
Video multisocket : connecting socket 1 on port 5555 TCP
Thread `update_ros` started
Video recorder thread initialisation
Set IP_TOS ok
Starting thread navdata_update
Starting thread ardrone_control
Thread navdata_update in progress...
PA : MEMORY SPACE ALLOWED : 40 MB
Start thread thread_academy
Start thread thread_academy_upload
Start thread thread_academy_download
Academy download stage resumed
Academy download stage paused
Timeout when reading navdatas - resending a navdata request on port 5554
[286] General Navdata : Need to check multiconfig ... request config file
Academy download stage resumed
Academy download stage paused
[69] General Navdata : Config callback called with result 1
[72] General Navdata : State : 6
[76] General Navdata : Got config file
[102] General Navdata : End of config callback call
[166] General Navdata : Checking drone version ...
[170] General Navdata : Drone supports multiconfig
[69] General Navdata : Config callback called with result 1
[72] General Navdata : State : 7
[80] General Navdata : Got ids list
[102] General Navdata : End of config callback call
[184] General Navdata : Got AR.Drone ID list. Switch->1,1,1. ND->1
[198] General Navdata : Checking application efc8fd84 (desc : com.parrot.freeflight)
[198] General Navdata : Checking application b6bc397b (desc : com.digitalsirup.dronecontrolhd)
[198] General Navdata : Checking application e182b69b (desc : ardrone_driver)
[201] General Navdata : Found our application ... should not init
[234] General Navdata : We're requesting default user (00000000), do nothing.
Sending default CAT_SESSION settings
[69] General Navdata : Config callback called with result 1
[72] General Navdata : State : 8
[84] General Navdata : Got current ids
[102] General Navdata : End of config callback call
[292] General Navdata : Send application navdata demo/options
[69] General Navdata : Config callback called with result 1
[72] General Navdata : State : 9
[88] General Navdata : Got navdatas
[102] General Navdata : End of config callback call
[301] General Navdata : Refreshing from MULTICONFIG FSM
[ INFO] [1352234375.681546174]: Successfully connected to 'My ARDrone' (AR-Drone 2.0 - Firmware: 2.1.20) - Battery(%): 57
The driver seems to use the default user profile, which is not updated according to the set ros parameters.
Changing the euler_angle_max
parameter to 30º instead of the default 12º and running the drone in a vicon system shows no change in drone behavior with the increased parameter value (this is also visually apparent).
Perhaps I am doing something incorrectly, in which case please let me know! If however this is an issue, I am happy to help debug – let me know what I can do!
Mike