-
Notifications
You must be signed in to change notification settings - Fork 17.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Rhys Mainwaring <[email protected]>
- Loading branch information
1 parent
c4450a6
commit 972a926
Showing
2 changed files
with
48 additions
and
108 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
""" | ||
A parameter loader for test cases (WIP) | ||
""" | ||
|
||
# class DDSParams(object): | ||
# def __init__(self): | ||
# super().__init__() | ||
# | ||
# # default params | ||
# self.mra_serial_device = f"./dev/ttyROS0" | ||
# self.mra_serial_baud = 115200 | ||
# self.mra_refs_file = "dds_xrce_profile.xml" | ||
# | ||
# self.ap_sim_vehicle_cmd = "sim_vehicle.py" | ||
# self.ap_serial_device = f"./dev/ttyROS1" | ||
# self.ap_serial_baud = 115200 | ||
# self.ap_vehicle = "ArduCopter" | ||
# self.ap_frame = "quad" | ||
# | ||
# pkg = get_package_share_directory("ardupilot_dds_tests") | ||
# | ||
# # The micro_ros_agent and ardupilot nodes do not expose params | ||
# # as ROS params, parse the config file and send them in as node args. | ||
# params = os.path.join(pkg, "config", "ardupilot_dds.yaml") | ||
# | ||
# with open(params, "r") as f: | ||
# params_str = f.read() | ||
# params = yaml.safe_load(params_str) | ||
# print(params) | ||
# | ||
# mra_params = params["/micro_ros_agent"] | ||
# if mra_params["transport"] == "serial": | ||
# self.mra_serial_baud = f"{mra_params['serial_baud']}" | ||
# self.mra_serial_device = f"{mra_params['serial_device']}" | ||
# self.mra_refs_file = f"{mra_params['refs_file']}" | ||
# | ||
# ap_params = params["/ardupilot"] | ||
# if ap_params: | ||
# self.ap_sim_vehicle_cmd = ap_params["sim_vehicle_cmd"] | ||
# self.ap_vehicle = ap_params["vehicle"] | ||
# self.ap_frame = ap_params["frame"] | ||
# self.ap_serial_device = ap_params["serial_device"] | ||
# self.ap_serial_baud = ap_params["serial_baud"] |
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