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
18 changed files
with
583 additions
and
436 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
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,109 @@ | ||
#! /usr/bin/env python | ||
|
||
# cd ~/cfg/ | ||
# chmod +x your_file.cfg | ||
|
||
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) | ||
|
||
LOE_est_enum = gen.enum([ gen.const("NO", int_t, 0, "Nominal test"), | ||
gen.const("LOE_FICTIVE", int_t, 1, "LOE fictive"), | ||
gen.const("LOE_CALCUL", int_t, 2, "LOE calcul"), | ||
gen.const("LOE_FDD", int_t, 3, "LOE fdd")], | ||
"An enum to chose LOE estimation mode") | ||
gen.add("LOE_estimation", int_t, 0, "LOE estimation", 0, 0, 3, edit_method=LOE_est_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, "fault time 1", 0.0, 0.0, 100.0) | ||
group5.add("LOE_t2", double_t, 0.0, "fault time 2", 0.0, 0.0, 100.0) | ||
group5.add("LOE_t3", double_t, 0.0, "fault time 3", 0.0, 0.0, 100.0) | ||
group5.add("LOE_t4", double_t, 0.0, "fault time 4", 0.0, 0.0, 100.0) | ||
group5.add("LOE_t5", double_t, 0.0, "fault time 5", 0.0, 0.0, 100.0) | ||
group5.add("LOE_t6", double_t, 0.0, "fault time 6", 0.0, 0.0, 100.0) | ||
|
||
#group3.add("kT", double_t, NEW_PARAMETERS["value"], "thrust constant", 8.54858e-6, 1e-7, 1e-5) | ||
#group3.add("factor", double_t, NEW_PARAMETERS["value"], "scaling factor", 0.035, 0.0, 0.05) | ||
|
||
group4.add("kz", double_t, CONTROLLER_GAIN["value"],"k-z", 14.7226, 0.0, 23.2925) | ||
group4.add("kvz", double_t, CONTROLLER_GAIN["value"],"k-zd", 6.8078, 0.0, 8.47) | ||
group4.add("kiz", double_t, CONTROLLER_GAIN["value"],"k-iz", 12.2474, 0.0, 25.025) | ||
|
||
group4.add("kx", double_t, CONTROLLER_GAIN["value"],"k-x", 1.2426, 0.0, 2.0) | ||
group4.add("kvx", double_t, CONTROLLER_GAIN["value"],"k-xd", 0.7085, 0.0, 2.0) | ||
group4.add("kix", double_t, CONTROLLER_GAIN["value"],"k-ix", 0.9913, 0.0, 2.0) | ||
group4.add("ky", double_t, CONTROLLER_GAIN["value"],"k-y", -0.9479, -2.0, 0.0) | ||
group4.add("kvy", double_t, CONTROLLER_GAIN["value"],"k-yd", -0.5505, -2.0, 0.0) | ||
group4.add("kiy", double_t, CONTROLLER_GAIN["value"],"k-iy", -0.7657, -2.0, 0.0) | ||
|
||
#group4.add("kx", double_t, CONTROLLER_GAIN["value"],"k-x", 1.6651, 0.0, 2.0) | ||
#group4.add("kvx", double_t, CONTROLLER_GAIN["value"],"k-xd", 0.9236, 0.0, 2.0) | ||
#group4.add("kix", double_t, CONTROLLER_GAIN["value"],"k-ix", 1.3486, 0.0, 2.0) | ||
#group4.add("ky", double_t, CONTROLLER_GAIN["value"],"k-y", -1.5145, -2.0, 0.0) | ||
#group4.add("kvy", double_t, CONTROLLER_GAIN["value"],"k-yd", -0.8551, -2.0, 0.0) | ||
#group4.add("kiy", double_t, CONTROLLER_GAIN["value"],"k-iy", -1.1930, -2.0, 0.0) | ||
|
||
group4.add("kphi", double_t, CONTROLLER_GAIN["value"],"k-phi", 1.7378, 0.0, 10.0) | ||
group4.add("kp", double_t, CONTROLLER_GAIN["value"],"k-p", 0.3476, 0.0, 1.0) | ||
group4.add("kiphi", double_t, CONTROLLER_GAIN["value"],"k-iphi", 0.0, 0.0, 20.0) | ||
group4.add("ktheta", double_t, CONTROLLER_GAIN["value"],"k-theta", 2.2946, 0.0, 10.0) | ||
group4.add("kq", double_t, CONTROLLER_GAIN["value"],"k-q", 0.4589, 0.0, 1.0) | ||
group4.add("kitheta", double_t, CONTROLLER_GAIN["value"],"k-itheta", 0.0, 0.0, 20.0) | ||
group4.add("kpsi", double_t, CONTROLLER_GAIN["value"],"k-psi", 0.3036, 0.0, 0.498) | ||
group4.add("kr", double_t, CONTROLLER_GAIN["value"],"k-p", 0.2440, 0.0, 0.3130) | ||
group4.add("kipsi", double_t, CONTROLLER_GAIN["value"],"k-ipsi", 0.1581, 0.0, 0.3162) | ||
|
||
#group4.add("kphi", double_t, CONTROLLER_GAIN["value"],"k-phi", 2.6042, 0.0, 10.0) | ||
#group4.add("kp", double_t, CONTROLLER_GAIN["value"],"k-p", 0.4431, 0.0, 1.0) | ||
#group4.add("kiphi", double_t, CONTROLLER_GAIN["value"],"k-iphi", 0.0, 0.0, 20.0) | ||
#group4.add("ktheta", double_t, CONTROLLER_GAIN["value"],"k-theta", 2.8913 , 0.0, 10.0) | ||
#group4.add("kq", double_t, CONTROLLER_GAIN["value"],"k-q", 0.5163, 0.0, 1.0) | ||
#group4.add("kitheta", double_t, CONTROLLER_GAIN["value"],"k-itheta", 0.0, 0.0, 20.0) | ||
#group4.add("kpsi", double_t, CONTROLLER_GAIN["value"],"k-psi", 0.7660, 0.0, 1.0) | ||
#group4.add("kr", double_t, CONTROLLER_GAIN["value"],"k-p", 0.4006, 0.0, 1.0) | ||
#group4.add("kipsi", double_t, CONTROLLER_GAIN["value"],"k-ipsi", 0.5774, 0.0, 1.0) | ||
|
||
exit(gen.generate(PACKAGE, "gsft_control", "controllerGS1Dyn")) |
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
File renamed without changes.
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,13 @@ | ||
<launch> | ||
<arg name="world_name" default="basic"/> | ||
<arg name="enable_logging" default="false" /> | ||
<arg name="enable_ground_truth" default="true" /> | ||
<arg name="debug" default="false"/> | ||
|
||
<group ns="firefly"> | ||
<node name="tuning_GS1" pkg="gsft_control" type="tuning_GS1_node" output="screen"> | ||
<param name="~scenario" value="gazebo" type="str"/> | ||
<remap from="odometry" to="odometry_sensor1/odometry" /> | ||
</node> | ||
</group> | ||
</launch> |
Oops, something went wrong.