forked from MRASL/gsft_control
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
30 changed files
with
4,053 additions
and
964 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
#! /usr/bin/env python | ||
|
||
PACKAGE='gsft_control' | ||
import roslib | ||
roslib.load_manifest(PACKAGE) | ||
|
||
from dynamic_reconfigure.parameter_generator_catkin import * | ||
|
||
gen = ParameterGenerator() | ||
|
||
ENABLE_CTRL = gen.const("ENABLE_CTRL", int_t, 0x00000001, "enable_ctrl") | ||
NEW_REFERENCES = gen.const("NEW_REFERENCES", int_t, 0x00000002, "new_references") | ||
#NEW_PARAMETERS = gen.const("NEW_PARAMETERS", int_t, 0x00000004, "drone_parameter") | ||
CONTROLLER_GAIN = gen.const("CONTROLLER_GAIN", int_t, 0x00000008, "controller_gain") | ||
#LOE = gen.const("LOE", int_t, 0x01000000, "lost_of_control_effectiveness") | ||
|
||
group1 = gen.add_group("group_control") | ||
group2 = gen.add_group("group_waypoint_references") | ||
#group3 = gen.add_group("group3_drone_parameters") | ||
group4 = gen.add_group("group_controller_gains") | ||
group5 = gen.add_group("group_LOE") | ||
|
||
# Name Type Reconfiguration level Description Default Min Max | ||
gen.add("RESET", bool_t, 0, "reset parameters, gains", False) | ||
|
||
test_mode_enum = gen.enum([ gen.const("TEST_MANUAL", int_t, 0, "Manual test"), | ||
gen.const("TEST_WAYPOINT", int_t, 1, "Waypoint test"), | ||
gen.const("TEST_TRACKING", int_t, 2, "Circular tracking test")], | ||
"An enum to chose test mode") | ||
gen.add("test_mode", int_t, 0, "test mode", 0, 0, 2, edit_method=test_mode_enum) | ||
|
||
group1.add("enable_take_off", bool_t, ENABLE_CTRL["value"], "enable take off", False) # ENABLE_CTRL["value"] = 0x00000001 | ||
group1.add("enable_landing", bool_t, ENABLE_CTRL["value"], "enable landing", False) | ||
group1.add("send_waypoint", bool_t, ENABLE_CTRL["value"], "send new waypoint", False) | ||
group1.add("new_controller_gains", bool_t, ENABLE_CTRL["value"], "change controller gains", False) | ||
#group1.add("new_drone_parameters", bool_t, ENABLE_CTRL["value"], "change drone parameters", False) # to do later | ||
#group1.add("enable_yaw", bool_t, ENABLE_CTRL["value"], "enable yaw-control", True) # to do later | ||
#group1.add("enable_gohome", bool_t, ENABLE_CTRL["value"], "enable go home", False) # to do later | ||
|
||
group2.add("ref_x", double_t, NEW_REFERENCES["value"], "X position reference", 0.0, -2.0, 2.0) | ||
group2.add("ref_y", double_t, NEW_REFERENCES["value"], "Y position reference", 0.0, -2.0, 2.0) | ||
group2.add("ref_z", double_t, NEW_REFERENCES["value"], "Z position reference", 0.5, 0.0, 1.5) | ||
group2.add("ref_yaw_deg", double_t, NEW_REFERENCES["value"], "yaw angle reference", 0.0, -180.0, 180.0) | ||
|
||
group5.add("LOE_1", double_t, 0.0, "lost of control 1", 0.0, 0.0, 1.0) | ||
group5.add("LOE_2", double_t, 0.0, "lost of control 2", 0.0, 0.0, 1.0) | ||
group5.add("LOE_3", double_t, 0.0, "lost of control 3", 0.0, 0.0, 1.0) | ||
group5.add("LOE_4", double_t, 0.0, "lost of control 4", 0.0, 0.0, 1.0) | ||
group5.add("LOE_5", double_t, 0.0, "lost of control 5", 0.0, 0.0, 1.0) | ||
group5.add("LOE_6", double_t, 0.0, "lost of control 6", 0.0, 0.0, 1.0) | ||
group5.add("LOE_t1", double_t, 0.0, "occurs time 1", 0.0, 0.0, 100.0) | ||
group5.add("LOE_t2", double_t, 0.0, "occurs time 2", 0.0, 0.0, 100.0) | ||
group5.add("LOE_t3", double_t, 0.0, "occurs time 3", 0.0, 0.0, 100.0) | ||
group5.add("LOE_t4", double_t, 0.0, "occurs time 4", 0.0, 0.0, 100.0) | ||
group5.add("LOE_t5", double_t, 0.0, "occurs time 5", 0.0, 0.0, 100.0) | ||
group5.add("LOE_t6", double_t, 0.0, "occurs time 6", 0.0, 0.0, 100.0) | ||
|
||
|
||
exit(gen.generate(PACKAGE, "gsft_control", "controllerDyn")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.