-
Notifications
You must be signed in to change notification settings - Fork 0
Add new FlexBE states for TF lookup, laser mapping and TF offset #2
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
Open
sambertibus99
wants to merge
1
commit into
main
Choose a base branch
from
skoehler/expactedPos
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| # Copyright 2023 Carologistics | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,118 +1,39 @@ | ||
| # FlexBE States and Behaviors for caro_skills | ||
| # Installing Flexbe | ||
|
|
||
| Generic template for a behaviors repository to be used for new projects | ||
| Follow the README in the [flexbe behavior engine repo](https://github.com/FlexBE/flexbe_behavior_engine) and the [flexbe webUI](https://github.com/FlexBE/flexbe_webui). | ||
|
|
||
| Modify this README as needed for your specific project details. | ||
| # Storing Behaviors | ||
|
|
||
| Below we provide basic details, but you are free to delete or modify this README as you wish. | ||
| Behaviors typically edited and generated by the FlexBE UI. | ||
| These generated files are stored in the | ||
| `install/caro_skills_flexbe_behaviors/lib/caro_skills_flexbe_behaviors/manifest` and | ||
| `install/caro_skills_flexbe_behaviors/python3.12/site-packages/caro_skills_flexbe_behaviors` folder. | ||
|
|
||
| ---- | ||
| To store it properly, save these files in the `src/caro_flexbe_behavior/manifest` and `src/caro_skills_flexbe_behaviors/caro_skills_flexbe_behaviors` folders. | ||
|
|
||
| This raw repository has several folders and files with the generic name `caro_skills`. | ||
|
|
||
|
|
||
| This repository is used by the FlexBE widget | ||
| [`create_repo`](https://github.com/FlexBE/flexbe_behavior_engine/blob/ros2-devel/flexbe_widget/bin/create_repo) | ||
| script to create an example project that you can build off of to add your own states and behaviors. | ||
|
|
||
| Using `ros2 run flexbe_widget create_repo <my_new_project_name>` will clone this repository, | ||
| and change the relevant `caro_skills` text to `my_new_project_name` as needed. | ||
|
|
||
| It sets up the `package.xml` files with proper FlexBE export tags. | ||
| It is maintained at version `0.0.1` as the starting point for your work. | ||
|
|
||
| We have provided a license file to conform to ROS guidelines; however, you are free to replace the | ||
| `LICENSE` file, and apply whatever license you choose to states and behaviors that you create. | ||
|
|
||
| This repository contains an example behavior and examples for writing your own state implementations. | ||
|
|
||
| ## Example States in `caro_skills_flexbe_states` | ||
|
|
||
| Packages providing FlexBE states are identified by an export tag in the `package.xml`: | ||
|
|
||
| ```xml | ||
| <export> | ||
| <flexbe_states /> | ||
| <build_type>ament_cmake</build_type> | ||
| </export> | ||
| ``` | ||
|
|
||
| * `example_state.py ` | ||
| * Example state implementation with extra console logging to show the state life cycle. | ||
|
|
||
| * `example_action_state.py` | ||
|
|
||
| > Note: These example states are defined with extra console logging that is useful when learning FlexBE, | ||
| > but you will typically not include so much of the `Logger.info` commands as in these examples. | ||
|
|
||
| > Note: You are free to copy and modify these files to create your own files and publish under your own license terms. | ||
| > As per the existing licenses, no warranty is implied. | ||
|
|
||
| ## Example Behaviors in `caro_skills_flexbe_behaviors` | ||
|
|
||
| Packages providing FlexBE behaviors are identified by an export tag in the `package.xml`: | ||
|
|
||
| ```xml | ||
| <export> | ||
| <flexbe_behaviors /> | ||
| <build_type>ament_cmake</build_type> | ||
| </export> | ||
| ``` | ||
|
|
||
| * `example_behavior_sm.py` | ||
| * Most basic example state machine | ||
|
|
||
| * `example_action_behavior_sm.py` | ||
| * Uses the `ExampleActionState` with the standard action tutorials | ||
|
|
||
| [Understanding ROS2 Actions](https://docs.ros.org/en/iron/Tutorials/Beginner-CLI-Tools/Understanding-ROS2-Actions/Understanding-ROS2-Actions.html) | ||
|
|
||
| [Introducing Turtlesim](https://docs.ros.org/en/iron/Tutorials/Beginner-CLI-Tools/Introducing-Turtlesim/Introducing-Turtlesim.html) | ||
|
|
||
| To execute the associated behavior in FlexBE, you need to first run the turtlesim node that provdes the action server | ||
|
|
||
| `ros2 run turtlesim turtlesim_node` | ||
|
|
||
| To display the available actions: | ||
|
|
||
| `ros2 action list` | ||
|
|
||
| The action is defined by: | ||
|
|
||
| `/turtle1/rotate_absolute:` [`turtlesim/action/RotateAbsolute`](https://docs.ros2.org/latest/api/turtlesim/action/RotateAbsolute.html) | ||
|
|
||
| Behaviors typically edited and generated by the FlexBE UI. | ||
| These generated files are stored in the root workspace `install` folder. | ||
| Presuming a `WORKSPACE_ROOT` environment variable exists, we provide a simple | ||
| [`copy_behavior`](caro_skills_flexbe_behaviors/bin/copy_behavior) script to copy a saved behavior | ||
| — both the Python implementation and manifest `.xml` file — | ||
| to the project source folder for long term storage. | ||
| Use `ros2 run caro_skills_flexbe_behavior copy_behavior` to see the usage guide. | ||
| The script should be run from this repository's base folder. | ||
|
|
||
| For a Quick-start and more comprehensive introduction to FlexBE, | ||
| see the [FlexBE Turtlesim Demonstrations](https://github.com/FlexBE/flexbe_turtlesim_demo). | ||
|
|
||
| # Our instructions: | ||
|
|
||
| ### start WebUI: | ||
| # Start WebUI: | ||
|
|
||
| ```ros2 launch flexbe_webui flexbe_ocs.launch.py headless:=True``` | ||
|
|
||
| ```ros2 run flexbe_webui webui_client``` | ||
|
|
||
| ```ros2 launch flexbe_onboard behavior_onboard.launch.py``` | ||
|
|
||
| ## start behavior without WebUI: | ||
| # Start behavior without WebUI: | ||
|
|
||
| requires flexbe_behavior_engine to be on carologistic's fork on branch [mtschesche/action_server_jazzy](https://github.com/carologistics/flexbe_behavior_engine/tree/mtschesche/action_server_jazzy) | ||
|
|
||
| ```ros2 launch flexbe_onboard behavior_onboard.launch.py``` | ||
|
|
||
| ```ros2 run flexbe_widget be_action_server``` | ||
|
|
||
| example: | ||
| ## Examples for starting behaviors via action server: | ||
|
|
||
| MoveTo: | ||
| ``` | ||
| ros2 action send_goal /flexbe/execute_behavior flexbe_msgs/action/BehaviorExecution "{behavior_name: 'MoveTo', input_keys: ['frame_id','target_x','target_y','target_yaw'], input_values: ['map','3.0','4.5','1.0']}" | ||
| ``` | ||
| MotorMove: | ||
| ``` | ||
| ros2 action send_goal /flexbe/execute_behavior flexbe_msgs/action/BehaviorExecution "{behavior_name: 'MotorMove', input_keys: ['frame_id','target_x','target_y','target_yaw'], input_values: ['robotinobase1/base_link','0.0','-10.0','0.0']}" | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| # # Copyright 2026 Carologistics | ||
| # # | ||
| # # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # # you may not use this file except in compliance with the License. | ||
| # # You may obtain a copy of the License at | ||
| # # | ||
| # # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # # | ||
| # # Unless required by applicable law or agreed to in writing, software | ||
| # # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # # See the License for the specific language governing permissions and | ||
| # # limitations under the License. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Turtle? sounds like some tutorial stuff, this is generated but it should have been copied from somewhere