-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updated documentation and improved upon acting debugging. #479
Updated documentation and improved upon acting debugging. #479
Conversation
Added a new acting_debug launch file which launches only the necessary components for debugging. Updated the documentation for how to use the debugging node. Fixed a visual bug in the debug node where the trajectory was visualized wrongly.
WalkthroughThis pull request introduces a new launch file, Changes
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (7)
code/acting/launch/acting_debug.launch (2)
1-7
: Enhance documentation for better clarity.Consider improving the header comment and argument documentation:
- Add prerequisites and usage instructions
- Document the unit for
control_loop_rate
(seconds)- Explain the significance of the "hero" role name
<!-- -This launch file starts acting as well as the debug node. +This launch file initializes the acting system with debugging capabilities. + +Prerequisites: + - Carla simulator running + - ROS core running + +Usage: + roslaunch acting acting_debug.launch [args] --> <launch> <arg name="role_name" default="hero" /> - <arg name="control_loop_rate" default="0.05" /> + <arg name="control_loop_rate" default="0.05" doc="Control loop period in seconds (20Hz)" /> <arg name="show_rqt_plots_automatically" default="true" />
20-30
: Consider making filter type configurable via launch arguments.Currently, the filter type is hardcoded to "Kalman". For better flexibility, consider making it configurable:
<launch> + <arg name="pos_filter_type" default="Kalman" /> + <arg name="heading_filter_type" default="Kalman" /> ... <node pkg="perception" type="position_heading_publisher_node.py" name="position_heading_publisher_node" output="screen"> <param name="control_loop_rate" value="$(arg control_loop_rate)" /> <param name="role_name" value="$(arg role_name)" /> - <param name="pos_filter" value="Kalman" /> - <param name="heading_filter" value="Kalman" /> + <param name="pos_filter" value="$(arg pos_filter_type)" /> + <param name="heading_filter" value="$(arg heading_filter_type)" /> </node>doc/acting/acting_testing.md (3)
13-14
: Fix typo in documentationThere's a typo in the word "necesarry" which should be "necessary".
-There is a dedicated [acting_debug.launch](../../code/acting/launch/acting_debug.launch) file which starts the acting component **as well as the necesarry perception components** automatically. +There is a dedicated [acting_debug.launch](../../code/acting/launch/acting_debug.launch) file which starts the acting component **as well as the necessary perception components** automatically.
21-24
: Add missing comma and improve clarityThe sentence needs a comma after "As mentioned above", and it would be helpful to suggest backing up original configurations.
-As mentioned above this includes everything we need. +As mentioned above, this includes everything we need.Consider adding a note about backing up the original configuration files before making changes:
+- Before making changes, it's recommended to backup your original configuration files. - In [dev.launch](../../code/agent/launch/dev.launch) the [agent.launch](../../code/agent/launch/agent.launch) file is included.
🧰 Tools
🪛 LanguageTool
[uncategorized] ~22-~22: Possible missing comma found.
Context: ...om the acting package. As mentioned above this includes everything we need. - In ...(AI_HYDRA_LEO_MISSING_COMMA)
34-35
: Consider expanding plot configuration documentationThe mention of plot configurations in rqt-window could benefit from more detailed information, such as:
- Available plot types
- Common configuration examples
- Best practices for different debugging scenarios
Would you like assistance in expanding this section with more detailed documentation?
code/acting/src/acting/Acting_Debug_Node.py (2)
181-190
: LGTM! Consider enhancing documentation.The addition of position tracking variables and the
z_visual
parameter effectively addresses the trajectory visualization bug mentioned in the PR. The comments explain the purpose well.Consider adding a more specific comment about what "adjustment" might be needed for
z_visual
and under what circumstances. This would help future maintainers understand when and how to tune this parameter.
Line range hint
308-316
: Please clarify or remove the TODO comment.The position tracking implementation looks good, but there's an unclear TODO comment about spawn point usage. Consider either:
- Implementing the spawn point functionality if it's needed
- Removing the TODO if it's not necessary
- Adding more context about why/when this might be needed
This will help maintain clear documentation and avoid confusion for future developers.
Would you like me to help implement the spawn point functionality or create a GitHub issue to track this task?
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (3)
code/acting/launch/acting_debug.launch
(1 hunks)code/acting/src/acting/Acting_Debug_Node.py
(2 hunks)doc/acting/acting_testing.md
(2 hunks)
🧰 Additional context used
🪛 LanguageTool
doc/acting/acting_testing.md
[uncategorized] ~22-~22: Possible missing comma found.
Context: ...om the acting package. As mentioned above this includes everything we need. - In ...
(AI_HYDRA_LEO_MISSING_COMMA)
🔇 Additional comments (5)
code/acting/launch/acting_debug.launch (3)
9-12
: LGTM! Parameters are correctly forwarded to the base launch file.
32-39
: Verify RViz configuration and consider making plot topics configurable.
- The RViz configuration is referenced from a different package (
agent
). Let's verify its existence. - The rqt_plot topics seem specific to velocity testing. Consider making them configurable for different debugging scenarios.
#!/bin/bash
# Description: Verify RViz configuration file exists
# Test: Check if the rviz config exists
fd "rviz_config.rviz" --type f
<launch>
+ <arg name="debug_plot_topics" default="/carla/hero/Speed /paf/hero/target_velocity /paf/hero/throttle /paf/hero/brake" />
...
<group if="$(arg show_rqt_plots_automatically)">
<node pkg="rqt_plot" type="rqt_plot" output="screen" name="velocity_test"
- args="/carla/hero/Speed /paf/hero/target_velocity /paf/hero/throttle /paf/hero/brake"/>
+ args="$(arg debug_plot_topics)"/>
</group>
14-18
: Verify debug node implementation.
The node configuration looks correct, but let's verify the implementation.
✅ Verification successful
Node implementation verified successfully
The Acting_Debug_Node correctly implements both required parameters:
role_name
viaself.get_param("role_name", "ego_vehicle")
control_loop_rate
viaself.get_param("control_loop_rate", 0.05)
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Verify Acting_Debug_Node.py exists and implements required parameters
# Test 1: Check if the node file exists
fd "Acting_Debug_Node.py" --type f
# Test 2: Verify parameter usage in the node
rg -A 5 "rospy.get_param\(['\"]control_loop_rate['\"]|rospy.get_param\(['\"]role_name['\"]" Acting_Debug_Node.py
Length of output: 328
Script:
#!/bin/bash
# Let's verify the node implementation with the correct path
rg -A 5 "rospy.get_param\(['\"]control_loop_rate['\"]|rospy.get_param\(['\"]role_name['\"]" code/acting/src/acting/Acting_Debug_Node.py
# Also check the general structure of the node
cat code/acting/src/acting/Acting_Debug_Node.py
Length of output: 17616
doc/acting/acting_testing.md (1)
Line range hint 1-43
: Documentation successfully meets PR objectives
The documentation effectively covers all aspects mentioned in the PR objectives:
- Clear instructions for the new
acting_debug.launch
file - Comprehensive debugging setup guidance
- Configuration options for addressing visualization issues
The structure is well-organized and provides a good balance of high-level overview and detailed instructions.
🧰 Tools
🪛 LanguageTool
[uncategorized] ~22-~22: Possible missing comma found.
Context: ...om the acting package. As mentioned above this includes everything we need. - In ...
(AI_HYDRA_LEO_MISSING_COMMA)
code/acting/src/acting/Acting_Debug_Node.py (1)
300-300
: LGTM! Good fix for trajectory visualization.
Replacing the hardcoded z-coordinate with the configurable z_visual
parameter is a good improvement. This makes the trajectory height adjustable and fixes the visualization bug mentioned in the PR.
Checklist isn't fulfilled yet. |
Added a new acting_debug launch file which launches only the necessary components for debugging. Updated the documentation for how to use the debugging node. Fixed a visual bug in the debug node where the trajectory was visualized wrongly.
Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes # (issue)
Type of change
Please delete options that are not relevant.
Does this PR introduce a breaking change?
e.g. is old functionality not usable anymore
Most important changes
Which files functionalities are most important in this PR. On which part should the reviewer be focussed on?
Checklist:
Summary by CodeRabbit
New Features
acting_debug.launch
) for easier startup of acting and debugging components.Acting_Debug_Node
for improved handling and visualization of agent positions.Documentation
acting_testing.md
with clearer instructions for testing and tuning acting components, including new setup guides and operational details for theActing_Debug_Node
.