20
20
21
21
configurable_parameters = {
22
22
# Cache DB
23
- ' cache_db_plugin' : {
24
- ' default' : ' warehouse_ros_sqlite::DatabaseConnection' ,
25
- ' description' : ' Plugin to use for the trajectory cache database.'
23
+ " cache_db_plugin" : {
24
+ " default" : " warehouse_ros_sqlite::DatabaseConnection" ,
25
+ " description" : " Plugin to use for the trajectory cache database." ,
26
26
},
27
- ' cache_db_host' : {
28
- ' default' : '":memory:"' ,
29
- ' description' : 'Host for the trajectory cache database. Use ":memory:" for an in-memory database.'
27
+ " cache_db_host" : {
28
+ " default" : '":memory:"' ,
29
+ " description" : 'Host for the trajectory cache database. Use ":memory:" for an in-memory database.' ,
30
30
},
31
- ' cache_db_port' : {
32
- ' default' : '0' ,
33
- ' description' : ' Port for the trajectory cache database.'
31
+ " cache_db_port" : {
32
+ " default" : "0" ,
33
+ " description" : " Port for the trajectory cache database." ,
34
34
},
35
-
36
35
# Reconfigurable (these can be set at runtime and will update)
37
- ' start_tolerance' : { # Trajectory cache param
38
- ' default' : ' 0.025' ,
39
- ' description' : ' Reconfigurable cache param. Tolerance for the start state of the trajectory.'
36
+ " start_tolerance" : { # Trajectory cache param
37
+ " default" : " 0.025" ,
38
+ " description" : " Reconfigurable cache param. Tolerance for the start state of the trajectory." ,
40
39
},
41
- ' goal_tolerance' : { # Trajectory cache param
42
- ' default' : ' 0.001' ,
43
- ' description' : ' Reconfigurable cache param. Tolerance for the goal state of the trajectory.'
40
+ " goal_tolerance" : { # Trajectory cache param
41
+ " default" : " 0.001" ,
42
+ " description" : " Reconfigurable cache param. Tolerance for the goal state of the trajectory." ,
44
43
},
45
- ' prune_worse_trajectories' : { # Trajectory cache param
46
- ' default' : ' false' ,
47
- ' description' : ' Reconfigurable cache param. Whether to delete trajectories that are worse than the current trajectory.'
44
+ " prune_worse_trajectories" : { # Trajectory cache param
45
+ " default" : " false" ,
46
+ " description" : " Reconfigurable cache param. Whether to delete trajectories that are worse than the current trajectory." ,
48
47
},
49
- ' planner' : {
50
- ' default' : ' RRTstar' ,
51
- ' description' : ' Reconfigurable. Planner to use for trajectory planning.'
48
+ " planner" : {
49
+ " default" : " RRTstar" ,
50
+ " description" : " Reconfigurable. Planner to use for trajectory planning." ,
52
51
},
53
-
54
52
# Tutorial
55
- ' num_target_poses' : {
56
- ' default' : '4' ,
57
- ' description' : ' Number of target poses to generate.'
53
+ " num_target_poses" : {
54
+ " default" : "4" ,
55
+ " description" : " Number of target poses to generate." ,
58
56
},
59
- 'num_cartesian_target_paths_per_target_pose' : {
60
- 'default' : '2' , 'description' : 'Number of Cartesian paths to generate for each target pose.'
57
+ "num_cartesian_target_paths_per_target_pose" : {
58
+ "default" : "2" ,
59
+ "description" : "Number of Cartesian paths to generate for each target pose." ,
61
60
},
62
- ' cartesian_path_distance_m' : {
63
- ' default' : ' 0.10' ,
64
- ' description' : ' Length of the Cartesian path to set the goal for.'
61
+ " cartesian_path_distance_m" : {
62
+ " default" : " 0.10" ,
63
+ " description" : " Length of the Cartesian path to set the goal for." ,
65
64
},
66
-
67
65
# Trajectory Cache
68
- ' exact_match_precision' : {
66
+ " exact_match_precision" : {
69
67
# Purposely set a relatively high value to make pruning obvious.
70
- ' default' : ' 0.0001' ,
71
- ' description' : ' Precision for checking if two trajectories are exactly the same.'
68
+ " default" : " 0.0001" ,
69
+ " description" : " Precision for checking if two trajectories are exactly the same." ,
72
70
},
73
- ' cartesian_max_step' : {
74
- ' default' : ' 0.001' ,
75
- ' description' : ' Maximum step size for the Cartesian path.'
71
+ " cartesian_max_step" : {
72
+ " default" : " 0.001" ,
73
+ " description" : " Maximum step size for the Cartesian path." ,
76
74
},
77
- ' cartesian_jump_threshold' : {
78
- ' default' : ' 0.0' ,
79
- ' description' : ' Threshold for the jump distance between points in the Cartesian path.'
75
+ " cartesian_jump_threshold" : {
76
+ " default" : " 0.0" ,
77
+ " description" : " Threshold for the jump distance between points in the Cartesian path." ,
80
78
},
81
79
}
82
80
83
81
84
82
def declare_configurable_parameters (parameters ):
85
83
return [
86
84
DeclareLaunchArgument (
87
- param_name ,
88
- default_value = param ['default' ],
89
- description = param ['description' ]
90
- ) for param_name , param in parameters .items ()
85
+ param_name , default_value = param ["default" ], description = param ["description" ]
86
+ )
87
+ for param_name , param in parameters .items ()
91
88
]
92
89
93
90
94
91
def set_configurable_parameters (parameters ):
95
92
return {
96
- param_name : LaunchConfiguration (param_name )
97
- for param_name in parameters .keys ()
93
+ param_name : LaunchConfiguration (param_name ) for param_name in parameters .keys ()
98
94
}
99
95
100
96
@@ -114,8 +110,6 @@ def generate_launch_description():
114
110
)
115
111
116
112
return LaunchDescription (
117
- declare_configurable_parameters (configurable_parameters ) +
118
- [
119
- trajectory_cache_demo
120
- ]
113
+ declare_configurable_parameters (configurable_parameters )
114
+ + [trajectory_cache_demo ]
121
115
)
0 commit comments