Skip to content
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

608 feature integrate teb local planner #660

Closed
wants to merge 2 commits into from

Conversation

vinzenzm
Copy link
Collaborator

@vinzenzm vinzenzm commented Jan 26, 2025

Description

This PR includes the basis for all TEB functionality.
It includes the installs in the docker-files.

It is specifically designed to avoid conflicts in the future by separating this from any functional changes.

Fixes #608

Type of change

  • New feature

Does this PR introduce a breaking change?

No

Most important changes

Added installs to Dockerfiles

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works (might be obsolete with CI later on)
  • New and existing unit tests pass locally with my changes (might be obsolete with CI later on)

Summary by CodeRabbit

  • New Features

    • Added TEB Local Planner documentation explaining trajectory optimization for robotic navigation
    • Enhanced Docker image with TEB Local Planner package installation
  • Documentation

    • Created comprehensive guide for TEB Local Planner integration and configuration

Dockerfile now automatically installs the teb_local_planner.
Started on documentation of usage.
This includes a guide on tuning and links to all relevant sources.
@vinzenzm vinzenzm linked an issue Jan 26, 2025 that may be closed by this pull request
Copy link
Contributor

coderabbitai bot commented Jan 26, 2025

Walkthrough

The pull request introduces the TEB (Timed Elastic Bands) Local Planner into the project's build structure. This involves modifying the Docker image Dockerfile to install the ros-noetic-teb-local-planner package and clone the ros_teb_planner repository from GitHub. Additionally, a new documentation file teb_local_planner.md has been added to explain the planner's functionality, integration, and configuration parameters.

Changes

File Change Summary
build/docker/agent/Dockerfile Added installation of ros-noetic-teb-local-planner package and cloning of ros_teb_planner repository
doc/acting/teb_local_planner.md New documentation file explaining TEB Local Planner integration, usage, and configuration

Assessment against linked issues

Objective Addressed Explanation
Install dependencies for TEB planner
Build structure supports TEB planner

Poem

🐰 A rabbit's tale of planning with glee,
TEB planner joins our robotic spree!
Elastic bands, trajectories so neat,
Obstacles dodge, navigation's a treat!
Docker builds, docs unfurl with pride,
Our robot's path, now smooth and wide! 🤖


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?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@vinzenzm vinzenzm requested a review from seitzseb January 26, 2025 21:10
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (4)
doc/acting/teb_local_planner.md (4)

4-5: Enhance the introduction with more context.

Consider expanding the summary to include:

  • The purpose and benefits of using TEB local planner
  • Key features and capabilities
  • Target audience for this documentation

75-82: Improve frame configuration documentation.

The explanation of frame configuration could be clearer. Consider adding:

  • Why these specific frames are used
  • The impact of frame selection on the planner's behavior

130-146: Document footprint configuration trade-offs.

The section about footprint configuration could be enhanced by:

  1. Explaining why the polygon shape causes optimizer failures
  2. Documenting the performance implications of different footprint types
  3. Adding a comparison table of footprint configurations
🧰 Tools
🪛 LanguageTool

[typographical] ~141-~141: It appears that a comma is missing.
Context: ...ing_radius: 12 ``` In an ideal case the polygon shape would be optimal for ...

(DURING_THAT_TIME_COMMA)


[typographical] ~142-~142: Consider adding two commas here.
Context: ... this planning. In testing the optimizer however failed miserable when trying this. We a...

(HOWEVER_COMMA)


147-159: Improve move_base section formatting and clarity.

Consider these improvements:

  1. Add subsections for better organization
  2. Use bullet points for listing challenges
  3. Add a diagram showing the relationship between move_base and TEB planner
🧰 Tools
🪛 LanguageTool

[uncategorized] ~155-~155: A comma may be missing after the conjunctive/linking adverb ‘However’.
Context: ...full move_base interface into our code. However the complete stack relies heavily on bi...

(SENT_START_CONJUNCTIVE_LINKING_ADVERB_COMMA)


[uncategorized] ~156-~156: A comma may be missing after the conjunctive/linking adverb ‘Also’.
Context: ...e constantly changing in our situation. Also we are only interested in the local_pla...

(SENT_START_CONJUNCTIVE_LINKING_ADVERB_COMMA)


[typographical] ~158-~158: Use a comma after an introductory phrase.
Context: ..._planner with any other planner easily. For this we would need to integrate move_base.

(COMMA_INTRODUCTORY_WORDS_PHRASES)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f173849 and be413cf.

⛔ Files ignored due to path filters (1)
  • doc/assets/acting/single_teb.png is excluded by !**/*.png
📒 Files selected for processing (2)
  • build/docker/agent/Dockerfile (2 hunks)
  • doc/acting/teb_local_planner.md (1 hunks)
🧰 Additional context used
🪛 Hadolint (2.12.0)
build/docker/agent/Dockerfile

[error] 106-106: Do not use sudo as it leads to unpredictable behavior. Use a tool like gosu to enforce root

(DL3004)

🪛 LanguageTool
doc/acting/teb_local_planner.md

[grammar] ~33-~33: Did you mean to write ‘therefore’?
Context: ...is integrated with dynamic reconfigure, therefor RQT reconfigure panel can be used to ad...

(THEREFORE)


[typographical] ~89-~89: Consider adding two commas here.
Context: ...r dt_h beeing 0.1 * dt_ref. These values however worked good at testing. Smaller dts lea...

(HOWEVER_COMMA)


[formatting] ~97-~97: Consider adding a comma after ‘Obviously’ for more clarity.
Context: ...ons: 3 optimization_activate: True ``` Obviously optimization should be activated. The m...

(CONJUNCTIVE_LINKING_ADVERB_COMMA_PREMIUM)


[style] ~106-~106: As an alternative to the over-used intensifier ‘very’, consider replacing this phrase.
Context: ...ss_planning: False ``` This setting is very important for performance. If homotopy is activat...

(EN_WEAK_ADJECTIVE)


[typographical] ~141-~141: It appears that a comma is missing.
Context: ...ing_radius: 12 ``` In an ideal case the polygon shape would be optimal for ...

(DURING_THAT_TIME_COMMA)


[typographical] ~142-~142: Consider adding two commas here.
Context: ... this planning. In testing the optimizer however failed miserable when trying this. We a...

(HOWEVER_COMMA)


[uncategorized] ~155-~155: A comma may be missing after the conjunctive/linking adverb ‘However’.
Context: ...full move_base interface into our code. However the complete stack relies heavily on bi...

(SENT_START_CONJUNCTIVE_LINKING_ADVERB_COMMA)


[uncategorized] ~156-~156: A comma may be missing after the conjunctive/linking adverb ‘Also’.
Context: ...e constantly changing in our situation. Also we are only interested in the local_pla...

(SENT_START_CONJUNCTIVE_LINKING_ADVERB_COMMA)


[typographical] ~158-~158: Use a comma after an introductory phrase.
Context: ..._planner with any other planner easily. For this we would need to integrate move_base.

(COMMA_INTRODUCTORY_WORDS_PHRASES)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Build and push image
🔇 Additional comments (1)
doc/acting/teb_local_planner.md (1)

21-21: ⚠️ Potential issue

Fix the broken image reference.

The image reference shows "MISSING: TEB-Example". Please ensure the image file exists at the specified path ./../assets/acting/single_teb.png.

Comment on lines +108 to +109
ARG TEB_PLANNER_PA_GITHUB_URL=https://github.com/TUC-ProAut/ros_teb_planner.git
RUN git clone $TEB_PLANNER_PA_GITHUB_URL src/ros_teb_planner
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Pin the repository to a specific version.

Consider pinning the ros_teb_planner repository to a specific commit or tag for better reproducibility.

Apply this diff to pin the repository version:

 ARG TEB_PLANNER_PA_GITHUB_URL=https://github.com/TUC-ProAut/ros_teb_planner.git
-RUN git clone $TEB_PLANNER_PA_GITHUB_URL src/ros_teb_planner
+RUN git clone $TEB_PLANNER_PA_GITHUB_URL src/ros_teb_planner && \
+    cd src/ros_teb_planner && \
+    git checkout <specific-commit-or-tag>

Committable suggestion skipped: line range outside the PR's diff.

Comment on lines +105 to +110
# Install teb_local_planner as well as teb_planner_pa
RUN sudo apt-get install -y \
ros-noetic-teb-local-planner
ARG TEB_PLANNER_PA_GITHUB_URL=https://github.com/TUC-ProAut/ros_teb_planner.git
RUN git clone $TEB_PLANNER_PA_GITHUB_URL src/ros_teb_planner

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Address security concerns in package installation.

The use of sudo in Dockerfile instructions is discouraged as it can lead to unpredictable behavior.

Apply this diff to fix the security issue:

-# Install teb_local_planner as well as teb_planner_pa
-RUN sudo apt-get install -y \
+# Install teb_local_planner as well as teb_planner_pa
+USER root
+RUN apt-get install -y \
     ros-noetic-teb-local-planner
 ARG TEB_PLANNER_PA_GITHUB_URL=https://github.com/TUC-ProAut/ros_teb_planner.git
-RUN git clone $TEB_PLANNER_PA_GITHUB_URL src/ros_teb_planner
+RUN git clone $TEB_PLANNER_PA_GITHUB_URL src/ros_teb_planner && \
+    chown -R $USERNAME:$USERNAME src/ros_teb_planner
+USER $USERNAME
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# Install teb_local_planner as well as teb_planner_pa
RUN sudo apt-get install -y \
ros-noetic-teb-local-planner
ARG TEB_PLANNER_PA_GITHUB_URL=https://github.com/TUC-ProAut/ros_teb_planner.git
RUN git clone $TEB_PLANNER_PA_GITHUB_URL src/ros_teb_planner
# Install teb_local_planner as well as teb_planner_pa
USER root
RUN apt-get install -y \
ros-noetic-teb-local-planner
ARG TEB_PLANNER_PA_GITHUB_URL=https://github.com/TUC-ProAut/ros_teb_planner.git
RUN git clone $TEB_PLANNER_PA_GITHUB_URL src/ros_teb_planner && \
chown -R $USERNAME:$USERNAME src/ros_teb_planner
USER $USERNAME
🧰 Tools
🪛 Hadolint (2.12.0)

[error] 106-106: Do not use sudo as it leads to unpredictable behavior. Use a tool like gosu to enforce root

(DL3004)

@vinzenzm
Copy link
Collaborator Author

vinzenzm commented Feb 1, 2025

As we decided against TEB - Local Planner for now I will close this PR and create a new one with documentation and HOW-TOs about TEB Planner.

@vinzenzm vinzenzm closed this Feb 1, 2025
@asamluka asamluka deleted the 608-feature-integrate-teb-local-planner branch March 11, 2025 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature]: Integrate TEB local planner
1 participant