Commit a7326b3
cleanup: fix 5 real bugs flagged by tests/static/check_ros2_port.sh
Run the new static check suite and fix every failure it surfaces.
After this commit: 82 checks, 82 passed, 0 failed, 0 skipped.
The 5 failures were caught across sections K, L, M, and N of the
new bash runner:
K. Hardcoded user-specific absolute paths
- 6 launch files in autonomy_real/real_experiment_launch hardcoded
DeclareLaunchArgument('dir', default_value='/home/dcist/bags/...')
as the rosbag record output directory. Replaced with
'/tmp/kr_bags/...' defaults — still user-overrideable via the
ros2 launch CLI but at least the default exists on any machine.
Files: record_bag.launch.py, record_bag_ca_trip.launch.py,
record_bag_for_spencer.launch.py, record_bag_max_seam.launch.py,
record_bag_atl.launch.py.
- real_experiment_launch/util/convert_multicam_calib_to_msckf.py
hardcoded /home/dcist/multicam_calibration/calib/example/ as
the input folder. Rewrote to accept the path via argparse
(--in-folder) or SLIDESLAM_MULTICAM_CALIB_DIR env var, with a
~/multicam_calibration/... default.
- fake_sloam/fake_sloam/fake_sloam_node.py hardcoded
/home/sam/LRS-SLAM/.../treeposition_nn_radius_5.txt as the
`input_file` parameter default. Changed to an empty string
default with a prominent comment documenting the required
override path.
L. Node(executable=...) unresolved in 4 entries
- estimation_launch/launch/estimation.launch.py referenced
Node(package='fla_ukf', executable='fla_ukf_node') but fla_ukf
builds a rclcpp_components composable node, not a standalone
executable. Rewrote the launch to use ComposableNodeContainer +
ComposableNode with plugin='fla_ukf::FLAUKFNodelet', hosted
inside rclcpp_components' component_container executable.
- px4_interface_launch/launch/SO3_command_to_mavros.launch.py
had the same issue for mavros_interface. Same rewrite:
ComposableNodeContainer + ComposableNode with
plugin='mavros_interface::SO3CmdToMavros'.
- state_machine_launch/launch/replanner.launch.py referenced
Node(package='state_machine', executable='path_replanner').
The path_replanner.cpp source was deleted earlier in the port
(dead code commented out on master, dependencies no longer
exist). Stub the launch file to return an empty LaunchDescription
with a docstring pointing at how to reinstate it if someone ports
path_replanner.
- sim/full_sim_fake_semantic_lidar.launch.py referenced
Node(package='fake_sloam', executable='fake_sloam_node'). The
executable IS installed via fake_sloam's setup.py console_scripts
entry — the static check was blind to ament_python packages.
Teach check L to also search setup.py console_scripts as a
fallback after the CMakeLists resolution fails. The check's new
resolves_in_ament_python_pkg() helper finds the package's
setup.py by matching `name='<pkg>'` and then greps the
entry_points block for an entry `'<exe> = module:main'`.
M. 6 duplicate raw declare_parameter keys
- action_trackers/src/{land_tracker, take_off_tracker,
trajectory_tracker_upgraded}.cpp each declared the same 6 gain
parameters: gains.pos.{x,y,z}, gains.vel.{x,y,z}. All three
tracker plugins load into the SAME parent trackers_manager
rclcpp::Node, so the second tracker's raw declare_parameter
would throw ParameterAlreadyDeclared at runtime.
- Fix: new inline header
action_trackers/include/action_trackers/gain_params.hpp
defining action_trackers::declare_shared_gain_params<NodeLike>(node)
that wraps each declare_parameter call in a has_parameter guard.
The first tracker to Initialize() declares the parameters; the
other trackers' calls become no-ops. Each tracker .cpp now
includes the header and calls the helper instead of the 6
raw declare_parameter lines. The templated helper accepts any
NodeLike (SharedPtr or raw pointer).
N. Shell script ROS1 leftovers
- roscore string in autonomy_sim/unity_sim/dcist_utils/script/
unity_sim.sh line 28 — was a false positive inside a tmux
send-keys nested-quote string (`echo "ROS2: no roscore needed"`
inside `send-keys "..."`), but the lib.sh echo-stub carve-out
couldn't see the nested quote. Reworded the echo payload to not
contain `roscore` at all.
- devel/setup.bash in 9 entrypoint.sh files total — the earlier
sweep fixed `source /opt/ros/noetic/setup.bash` -> `source
/opt/ros/jazzy/setup.bash` but missed the workspace-level
`source /root/<ws>/devel/setup.bash` references. Sweep them all
now in autonomy_core/{base,client,control,estimation,interface,
map_plan,state_machine}/docker/entrypoint.sh plus
autonomy_sim/docker/entrypoint.sh and
autonomy_sim/unity_sim/docker/entrypoint.sh. devel/setup.bash ->
install/setup.bash in all 9 files.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 5446d27 commit a7326b3
24 files changed
Lines changed: 238 additions & 131 deletions
File tree
- autonomy_core
- client/docker
- control/docker
- estimation
- docker
- estimation_launch/launch
- interface
- docker
- px4_interface_launch/launch
- map_plan/docker
- state_machine
- action_trackers
- include/action_trackers
- src
- docker
- state_machine_launch/launch
- autonomy_real/real_experiment_launch
- launch
- special_purposes
- uav_ugv_localization
- util
- autonomy_sim
- docker
- unity_sim
- dcist_utils/script
- docker
- fake_sloam/fake_sloam
- tests/static
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
Lines changed: 42 additions & 31 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
88 | 98 | | |
| 99 | + | |
89 | 100 | | |
90 | 101 | | |
91 | 102 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
Lines changed: 32 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
58 | 69 | | |
| 70 | + | |
59 | 71 | | |
60 | 72 | | |
61 | 73 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
Lines changed: 47 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
Lines changed: 2 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
66 | 67 | | |
67 | 68 | | |
68 | 69 | | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
| 70 | + | |
75 | 71 | | |
76 | 72 | | |
77 | 73 | | |
| |||
Lines changed: 2 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
110 | 111 | | |
111 | 112 | | |
112 | 113 | | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
| 114 | + | |
119 | 115 | | |
120 | 116 | | |
121 | 117 | | |
| |||
0 commit comments