-
Notifications
You must be signed in to change notification settings - Fork 1
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
ROS 2 husarion UGV #92
Conversation
… into ros2-lynx-devel
ROS 2 config dir
… into ros2-lynx-devel
Ros2 lynx merge
WalkthroughThe pull request introduces significant modifications to Dockerfiles and related scripts, transitioning from the Changes
Possibly related PRs
Suggested reviewers
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
Documentation and Community
|
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: 7
🧹 Outside diff range and nitpick comments (4)
Dockerfile.simulation (2)
19-19
: Consider adding git security measuresWhen cloning and importing from VCS, consider adding security measures to verify the repository integrity.
-vcs import src < src/panther_ros/husarion_ugv/${HUSARION_ROS_BUILD_TYPE}_deps.repos && \ +# Verify the repository integrity +vcs import --recursive --verify-ssl src < src/panther_ros/husarion_ugv/${HUSARION_ROS_BUILD_TYPE}_deps.repos && \
29-29
: Consider build optimization strategiesThe current build command could be optimized for better build times and image size.
-colcon build --symlink-install --packages-up-to husarion_ugv --cmake-args -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=$BUILD_TEST && \ +colcon build --symlink-install \ + --packages-up-to husarion_ugv \ + --cmake-args \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_TESTING=$BUILD_TEST \ + -DCMAKE_CXX_FLAGS="-O3" \ + --parallel-workers $(nproc) && \Dockerfile.hardware (1)
31-31
: Consider using xmllint for more robust version extractionThe current sed command for version extraction might be fragile. Consider using xmllint for more reliable XML parsing.
-echo $(cat /ros2_ws/src/panther_ros/husarion_ugv/package.xml | grep '<version>' | sed -r 's/.*<version>([0-9]+.[0-9]+.[0-9]+)<\/version>/\1/g') >> /version.txt +echo $(xmllint --xpath "string(//version)" /ros2_ws/src/panther_ros/husarion_ugv/package.xml) >> /version.txtREADME.md (1)
35-44
: Documentation improvements look goodThe added section clearly explains the configuration update process and includes appropriate warnings. The documentation is well-structured and user-friendly.
Consider adding:
- A description of the expected contents of the config directory
- Instructions for creating and restoring configuration backups
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
📒 Files selected for processing (6)
Dockerfile.hardware
(3 hunks)Dockerfile.simulation
(2 hunks)README.md
(1 hunks)demo/compose.minimal-setup.yaml
(3 hunks)setup_environment.sh
(1 hunks)update_config_directory.sh
(1 hunks)
🧰 Additional context used
🪛 Shellcheck (0.10.0)
update_config_directory.sh
[warning] 8-8: Declare and assign separately to avoid masking return values.
(SC2155)
[warning] 16-16: Declare and assign separately to avoid masking return values.
(SC2155)
setup_environment.sh
[warning] 8-8: Don't use ls | grep. Use a glob or a for loop with a condition to allow non-alphanumeric filenames.
(SC2010)
🔇 Additional comments (6)
setup_environment.sh (1)
10-10
: Verify update_config_directory availability
The script calls update_config_directory
but doesn't verify if the function is available.
Dockerfile.hardware (2)
40-44
: Verify the existence and permissions of new scripts
New configuration management scripts have been added and integrated into the entrypoint.
✅ Verification successful
Scripts are present and properly configured
The verification shows that:
- Both scripts exist in the repository with correct executable permissions (755)
setup_environment.sh
sources robot configuration and manages config directory initializationupdate_config_directory.sh
handles package configuration file management with proper error handling- The scripts follow good practices with proper error handling (
set -e
) and clear structure
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Check if the scripts exist in the repository
gh api repos/husarion/panther_ros/contents/update_config_directory.sh
gh api repos/husarion/panther_ros/contents/setup_environment.sh
Length of output: 441
Script:
#!/bin/bash
# Let's check if these scripts exist in the PR branch
fd -t f "update_config_directory.sh|setup_environment.sh"
# Also check the content of entrypoint scripts to verify the modification
fd -t f ".*_entrypoint.sh" --exec cat {}
Length of output: 152
Script:
#!/bin/bash
# Let's check the content and permissions of these scripts
ls -l update_config_directory.sh setup_environment.sh
# Check their content
echo "=== Content of update_config_directory.sh ==="
cat update_config_directory.sh
echo -e "\n=== Content of setup_environment.sh ==="
cat setup_environment.sh
Length of output: 2089
29-29
: Verify husarion_ugv package and its dependencies
The build target has been updated to the new package name.
demo/compose.minimal-setup.yaml (3)
5-6
: Verify the config directory structure
The environment configuration has been moved to an external file. Please ensure the /home/husarion/config/common/.env
path is correctly set up during installation.
Consider documenting the expected structure and contents of the config directory in the README.
37-37
: Verify the existence of the bringup launch file
The launch command has been updated to use the new package structure.
Line range hint 9-27
: Verify consistency of service renaming
The service has been renamed from panther_ros
to husarion_ugv_ros
and configuration paths have been updated.
✅ Verification successful
Service renaming is consistent with remaining references
The remaining references to "panther" in the codebase are legitimate and expected:
- In
compose.minimal-setup.yaml
: Reference to the Docker imagehusarion/panther
- In
compose.simulation.yaml
: References to Gazebo simulation components and launch files - In
compose.rviz.yaml
: Reference to RViz configuration file
The service renaming from panther_ros
to husarion_ugv_ros
has been consistently applied, with no lingering references to the old service name found in any compose files.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Check for any remaining references to old names
rg -l 'panther_config\.(env|yaml)'
Length of output: 36
Script:
#!/bin/bash
# Search for any remaining references to 'panther' in yaml/env files
rg -l 'panther' --type yaml --type env
# Search for any references to the old container name
rg -l 'panther_ros' --type yaml --type compose
Length of output: 145
Script:
#!/bin/bash
# Search for any remaining references to 'panther' in yaml files and docker-compose files
fd -e yaml -e yml -e compose.yaml -e compose.yml | xargs rg -l 'panther'
# Search for the old container name specifically
fd -e yaml -e yml -e compose.yaml -e compose.yml | xargs rg -l 'panther_ros'
Length of output: 233
Script:
#!/bin/bash
# Check the context of 'panther' references in the found files
rg 'panther' -C 2 demo/compose.simulation.yaml demo/compose.rviz.yaml demo/compose.minimal-setup.yaml
Length of output: 1274
Summary by CodeRabbit
Release Notes
New Features
setup_environment.sh
for environment setup andupdate_config_directory.sh
for managing configuration files.Documentation
Bug Fixes
panther
package to thehusarion_ugv
package, ensuring smoother operation.