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

Add more dynamic settings. #213

Open
wants to merge 4 commits into
base: indigo-devel
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 35 additions & 3 deletions bebop_driver/cfg/autogenerated/BebopArdrone3.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python

# BebopArdrone3.cfg
# auto-generated from https://raw.githubusercontent.com/Parrot-Developers/arsdk-xml/ab28dab91845cd36c4d7002b55f70805deaff3c8/xml/ardrone3.xml
# auto-generated from https://raw.githubusercontent.com/bluecamel/arsdk-xml/53ed05daac60e1ff8391f09c8b6eb06c18a992b6/xml/ardrone3.xml
# Do not modify this file by hand. Check scripts/meta folder for generator files.

PACKAGE = "bebop_driver"
Expand All @@ -23,7 +23,7 @@ PilotingSettingsAbsolutControlOn_enum = gen.enum([
], "1 to enable, 0 to disable")
pilotingsettings_group_gen.add("PilotingSettingsAbsolutControlOn", int_t, 0, "1 to enable, 0 to disable", 0, 0, 1, edit_method=PilotingSettingsAbsolutControlOn_enum)
# Set max distance.\n You can get the bounds from the event [MaxDistance](#1-6-3).\n\n If [Geofence](#1-6-4) is activated, the drone wont fly over the given max distance.
pilotingsettings_group_gen.add("PilotingSettingsMaxDistanceValue", double_t, 0, "Current max distance in meter", 0 , 0.0, 2000.0)
pilotingsettings_group_gen.add("PilotingSettingsMaxDistanceValue", double_t, 0, "Current max distance in meter", 0 , 0, 160)
# Enable geofence.\n If geofence is enabled, the drone wont fly over the given max distance.\n You can get the max distance from the event [MaxDistance](#1-6-3). \n For copters: the distance is computed from the controller position, if this position is not known, it will use the take off.\n For fixed wings: the distance is computed from the take off position.
PilotingSettingsNoFlyOverMaxDistanceShouldnotflyover_enum = gen.enum([
gen.const("PilotingSettingsNoFlyOverMaxDistanceShouldnotflyover_OFF", int_t, 0, "Disabled"),
Expand Down Expand Up @@ -94,6 +94,34 @@ networksettings_group_gen.add("NetworkSettingsWifiSelectionChannel", int_t, 0, "

# Photo settings chosen by the user
picturesettings_group_gen = gen.add_group("picturesettings")
# Set picture format.\n Please note that the time required to take the picture is highly related to this format.\n Also, please note that if your picture format is different from snapshot, picture taking will stop video recording (it will restart after the picture has been taken).
PictureSettingsPictureFormatSelectionType_enum = gen.enum([
gen.const("PictureSettingsPictureFormatSelectionType_raw", int_t, 0, "Take raw image"),
gen.const("PictureSettingsPictureFormatSelectionType_jpeg", int_t, 1, "Take a 4:3 jpeg photo"),
gen.const("PictureSettingsPictureFormatSelectionType_snapshot", int_t, 2, "Take a 16:9 snapshot from camera"),
gen.const("PictureSettingsPictureFormatSelectionType_jpeg_fisheye", int_t, 3, "Take jpeg fisheye image only"),
], "The type of photo format")
picturesettings_group_gen.add("PictureSettingsPictureFormatSelectionType", int_t, 0, "The type of photo format", 0, 0, 3, edit_method=PictureSettingsPictureFormatSelectionType_enum)
# Set White Balance mode.
PictureSettingsAutoWhiteBalanceSelectionType_enum = gen.enum([
gen.const("PictureSettingsAutoWhiteBalanceSelectionType_auto", int_t, 0, "Auto guess of best white balance params"),
gen.const("PictureSettingsAutoWhiteBalanceSelectionType_tungsten", int_t, 1, "Tungsten white balance"),
gen.const("PictureSettingsAutoWhiteBalanceSelectionType_daylight", int_t, 2, "Daylight white balance"),
gen.const("PictureSettingsAutoWhiteBalanceSelectionType_cloudy", int_t, 3, "Cloudy white balance"),
gen.const("PictureSettingsAutoWhiteBalanceSelectionType_cool_white", int_t, 4, "White balance for a flash"),
], "The type auto white balance")
picturesettings_group_gen.add("PictureSettingsAutoWhiteBalanceSelectionType", int_t, 0, "The type auto white balance", 0, 0, 4, edit_method=PictureSettingsAutoWhiteBalanceSelectionType_enum)
# Set image exposure.
picturesettings_group_gen.add("PictureSettingsExpositionSelectionValue", double_t, 0, "Exposition value (bounds given by ExpositionChanged arg min and max, by default [-3:3])", 0 , -3.0, 3.0)
# Set image saturation.
picturesettings_group_gen.add("PictureSettingsSaturationSelectionValue", double_t, 0, "Saturation value (bounds given by SaturationChanged arg min and max, by default [-100:100])", 0 , -100.0, 100.0)
# Set timelapse mode.\n If timelapse mode is set, instead of taking a video, the drone will take picture regularly.\n Watch out, this command only configure the timelapse mode. Once it is configured, you can start/stop the timelapse with the [RecordVideo](#1-7-3) command.
PictureSettingsTimelapseSelectionEnabled_enum = gen.enum([
gen.const("PictureSettingsTimelapseSelectionEnabled_OFF", int_t, 0, "Disabled"),
gen.const("PictureSettingsTimelapseSelectionEnabled_ON", int_t, 1, "Enabled"),
], "1 if timelapse is enabled, 0 otherwise")
picturesettings_group_gen.add("PictureSettingsTimelapseSelectionEnabled", int_t, 0, "1 if timelapse is enabled, 0 otherwise", 0, 0, 1, edit_method=PictureSettingsTimelapseSelectionEnabled_enum)
picturesettings_group_gen.add("PictureSettingsTimelapseSelectionInterval", double_t, 0, "interval in seconds for taking pictures", 0 , 0, 120)
# Set video stabilization mode.
PictureSettingsVideoStabilizationModeMode_enum = gen.enum([
gen.const("PictureSettingsVideoStabilizationModeMode_roll_pitch", int_t, 0, "Video flat on roll and pitch"),
Expand Down Expand Up @@ -124,6 +152,10 @@ picturesettings_group_gen.add("PictureSettingsVideoResolutionsType", int_t, 0, "

# GPS settings
gpssettings_group_gen = gen.add_group("gpssettings")
# Set home position.
gpssettings_group_gen.add("GPSSettingsSetHomeLatitude", double_t, 0, "Home latitude in decimal degrees", 0 , -90.0, 90.0)
gpssettings_group_gen.add("GPSSettingsSetHomeLongitude", double_t, 0, "Home longitude in decimal degrees", 0 , -180.0, 180.0)
gpssettings_group_gen.add("GPSSettingsSetHomeAltitude", double_t, 0, "Home altitude in meters", 0 , 0, 160)
# Set the preferred home type.\n Please note that this is only a preference. The actual type chosen is given by the event [HomeType](#1-31-2).\n You can get the currently available types with the event [HomeTypeAvailability](#1-31-1).
GPSSettingsHomeTypeType_enum = gen.enum([
gen.const("GPSSettingsHomeTypeType_TAKEOFF", int_t, 0, "The drone will try to return to the take off position"),
Expand All @@ -135,4 +167,4 @@ gpssettings_group_gen.add("GPSSettingsHomeTypeType", int_t, 0, "The type of the
gpssettings_group_gen.add("GPSSettingsReturnHomeDelayDelay", int_t, 0, "Delay in second", 0 , 0, 120)


exit(gen.generate(PACKAGE, "bebop_driver_nodelet", "BebopArdrone3"))
exit(gen.generate(PACKAGE, "bebop_driver_nodelet", "BebopArdrone3"))
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCL
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

* Ardrone3_setting_callback_includes.h
* auto-generated from https://raw.githubusercontent.com/Parrot-Developers/arsdk-xml/ab28dab91845cd36c4d7002b55f70805deaff3c8/xml/ardrone3.xml
* auto-generated from https://raw.githubusercontent.com/bluecamel/arsdk-xml/53ed05daac60e1ff8391f09c8b6eb06c18a992b6/xml/ardrone3.xml
* Do not modify this file by hand. Check scripts/meta folder for generator files.
*/

Expand All @@ -47,10 +47,16 @@ namespace cb
class SpeedSettingsOutdoor;
class SpeedSettingsMaxPitchRollRotationSpeed;
class NetworkSettingsWifiSelection;
class PictureSettingsPictureFormatSelection;
class PictureSettingsAutoWhiteBalanceSelection;
class PictureSettingsExpositionSelection;
class PictureSettingsSaturationSelection;
class PictureSettingsTimelapseSelection;
class PictureSettingsVideoStabilizationMode;
class PictureSettingsVideoRecordingMode;
class PictureSettingsVideoFramerate;
class PictureSettingsVideoResolutions;
class GPSSettingsSetHome;
class GPSSettingsHomeType;
class GPSSettingsReturnHomeDelay;
} // namespace cb
Expand All @@ -75,10 +81,16 @@ boost::shared_ptr<cb::SpeedSettingsHullProtection> ardrone3_speedsettings_hullpr
boost::shared_ptr<cb::SpeedSettingsOutdoor> ardrone3_speedsettings_outdoor_ptr;
boost::shared_ptr<cb::SpeedSettingsMaxPitchRollRotationSpeed> ardrone3_speedsettings_maxpitchrollrotationspeed_ptr;
boost::shared_ptr<cb::NetworkSettingsWifiSelection> ardrone3_networksettings_wifiselection_ptr;
boost::shared_ptr<cb::PictureSettingsPictureFormatSelection> ardrone3_picturesettings_pictureformatselection_ptr;
boost::shared_ptr<cb::PictureSettingsAutoWhiteBalanceSelection> ardrone3_picturesettings_autowhitebalanceselection_ptr;
boost::shared_ptr<cb::PictureSettingsExpositionSelection> ardrone3_picturesettings_expositionselection_ptr;
boost::shared_ptr<cb::PictureSettingsSaturationSelection> ardrone3_picturesettings_saturationselection_ptr;
boost::shared_ptr<cb::PictureSettingsTimelapseSelection> ardrone3_picturesettings_timelapseselection_ptr;
boost::shared_ptr<cb::PictureSettingsVideoStabilizationMode> ardrone3_picturesettings_videostabilizationmode_ptr;
boost::shared_ptr<cb::PictureSettingsVideoRecordingMode> ardrone3_picturesettings_videorecordingmode_ptr;
boost::shared_ptr<cb::PictureSettingsVideoFramerate> ardrone3_picturesettings_videoframerate_ptr;
boost::shared_ptr<cb::PictureSettingsVideoResolutions> ardrone3_picturesettings_videoresolutions_ptr;
boost::shared_ptr<cb::GPSSettingsSetHome> ardrone3_gpssettings_sethome_ptr;
boost::shared_ptr<cb::GPSSettingsHomeType> ardrone3_gpssettings_hometype_ptr;
boost::shared_ptr<cb::GPSSettingsReturnHomeDelay> ardrone3_gpssettings_returnhomedelay_ptr;
#endif // DEFINE_SHARED_PTRS
Expand All @@ -102,10 +114,16 @@ ardrone3_speedsettings_hullprotection_ptr.reset(new cb::SpeedSettingsHullProtect
ardrone3_speedsettings_outdoor_ptr.reset(new cb::SpeedSettingsOutdoor(priv_nh));
ardrone3_speedsettings_maxpitchrollrotationspeed_ptr.reset(new cb::SpeedSettingsMaxPitchRollRotationSpeed(priv_nh));
ardrone3_networksettings_wifiselection_ptr.reset(new cb::NetworkSettingsWifiSelection(priv_nh));
ardrone3_picturesettings_pictureformatselection_ptr.reset(new cb::PictureSettingsPictureFormatSelection(priv_nh));
ardrone3_picturesettings_autowhitebalanceselection_ptr.reset(new cb::PictureSettingsAutoWhiteBalanceSelection(priv_nh));
ardrone3_picturesettings_expositionselection_ptr.reset(new cb::PictureSettingsExpositionSelection(priv_nh));
ardrone3_picturesettings_saturationselection_ptr.reset(new cb::PictureSettingsSaturationSelection(priv_nh));
ardrone3_picturesettings_timelapseselection_ptr.reset(new cb::PictureSettingsTimelapseSelection(priv_nh));
ardrone3_picturesettings_videostabilizationmode_ptr.reset(new cb::PictureSettingsVideoStabilizationMode(priv_nh));
ardrone3_picturesettings_videorecordingmode_ptr.reset(new cb::PictureSettingsVideoRecordingMode(priv_nh));
ardrone3_picturesettings_videoframerate_ptr.reset(new cb::PictureSettingsVideoFramerate(priv_nh));
ardrone3_picturesettings_videoresolutions_ptr.reset(new cb::PictureSettingsVideoResolutions(priv_nh));
ardrone3_gpssettings_sethome_ptr.reset(new cb::GPSSettingsSetHome(priv_nh));
ardrone3_gpssettings_hometype_ptr.reset(new cb::GPSSettingsHomeType(priv_nh));
ardrone3_gpssettings_returnhomedelay_ptr.reset(new cb::GPSSettingsReturnHomeDelay(priv_nh));

Expand Down Expand Up @@ -161,6 +179,21 @@ callback_map_.insert(std::pair<eARCONTROLLER_DICTIONARY_KEY, boost::shared_ptr<c
callback_map_.insert(std::pair<eARCONTROLLER_DICTIONARY_KEY, boost::shared_ptr<cb::AbstractCommand> >(
ardrone3_networksettings_wifiselection_ptr->GetCommandKey(),
ardrone3_networksettings_wifiselection_ptr));
callback_map_.insert(std::pair<eARCONTROLLER_DICTIONARY_KEY, boost::shared_ptr<cb::AbstractCommand> >(
ardrone3_picturesettings_pictureformatselection_ptr->GetCommandKey(),
ardrone3_picturesettings_pictureformatselection_ptr));
callback_map_.insert(std::pair<eARCONTROLLER_DICTIONARY_KEY, boost::shared_ptr<cb::AbstractCommand> >(
ardrone3_picturesettings_autowhitebalanceselection_ptr->GetCommandKey(),
ardrone3_picturesettings_autowhitebalanceselection_ptr));
callback_map_.insert(std::pair<eARCONTROLLER_DICTIONARY_KEY, boost::shared_ptr<cb::AbstractCommand> >(
ardrone3_picturesettings_expositionselection_ptr->GetCommandKey(),
ardrone3_picturesettings_expositionselection_ptr));
callback_map_.insert(std::pair<eARCONTROLLER_DICTIONARY_KEY, boost::shared_ptr<cb::AbstractCommand> >(
ardrone3_picturesettings_saturationselection_ptr->GetCommandKey(),
ardrone3_picturesettings_saturationselection_ptr));
callback_map_.insert(std::pair<eARCONTROLLER_DICTIONARY_KEY, boost::shared_ptr<cb::AbstractCommand> >(
ardrone3_picturesettings_timelapseselection_ptr->GetCommandKey(),
ardrone3_picturesettings_timelapseselection_ptr));
callback_map_.insert(std::pair<eARCONTROLLER_DICTIONARY_KEY, boost::shared_ptr<cb::AbstractCommand> >(
ardrone3_picturesettings_videostabilizationmode_ptr->GetCommandKey(),
ardrone3_picturesettings_videostabilizationmode_ptr));
Expand All @@ -173,6 +206,9 @@ callback_map_.insert(std::pair<eARCONTROLLER_DICTIONARY_KEY, boost::shared_ptr<c
callback_map_.insert(std::pair<eARCONTROLLER_DICTIONARY_KEY, boost::shared_ptr<cb::AbstractCommand> >(
ardrone3_picturesettings_videoresolutions_ptr->GetCommandKey(),
ardrone3_picturesettings_videoresolutions_ptr));
callback_map_.insert(std::pair<eARCONTROLLER_DICTIONARY_KEY, boost::shared_ptr<cb::AbstractCommand> >(
ardrone3_gpssettings_sethome_ptr->GetCommandKey(),
ardrone3_gpssettings_sethome_ptr));
callback_map_.insert(std::pair<eARCONTROLLER_DICTIONARY_KEY, boost::shared_ptr<cb::AbstractCommand> >(
ardrone3_gpssettings_hometype_ptr->GetCommandKey(),
ardrone3_gpssettings_hometype_ptr));
Expand Down
Loading