-
Notifications
You must be signed in to change notification settings - Fork 48
feat: rai_sim #415
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
Merged
Merged
feat: rai_sim #415
Changes from all commits
Commits
Show all changes
69 commits
Select commit
Hold shift + click to select a range
5a2333a
feat: benchmark class models
MagdalenaKotynia d3be95a
chore: naming changes
MagdalenaKotynia c4ca61a
chore: naming changes
MagdalenaKotynia f44f394
chore: redefine benchmark model
MagdalenaKotynia 7c1b2a1
refactor: SceneConfig to BaseModel class
MagdalenaKotynia 80112ce
feat: add SceneSetup to store initial scene setup
MagdalenaKotynia 466b22d
build: poetry initialization of rai_benchmarks and rai_simulations
MagdalenaKotynia 22fbb86
chore: add licence lines
MagdalenaKotynia d93509f
build: create packages from rai_benchmarks and rai_simulations
MagdalenaKotynia a81770e
chore: removed mistakenly added file
MagdalenaKotynia 5a84d95
feat: scene config implementation
MagdalenaKotynia 8ca1bf7
Add O3DEEngineConnector features
knicked e07f204
Remove an unused file
knicked 86d0e6d
Add binary path caching
knicked fe854f5
Add two example scenes
knicked 0737397
feat: replace binary path with ros2 launch command + binary path
MagdalenaKotynia 3803dfc
refactor: renamed rai_sim and rai_bench
MagdalenaKotynia f9c4910
fix: fixed shutdown of binary
MagdalenaKotynia 7f88240
chore: make pose mandatory
MagdalenaKotynia 9238d12
chore: remove rai_bench because it is developed on another branch
MagdalenaKotynia 8312b1a
ci: add missing license lines
MagdalenaKotynia 4edfd87
fix: avoid force killing ros2 launch, add check if process has started
MagdalenaKotynia 7d271c1
refactor: create PoseModel for storing pose from config, add methods …
MagdalenaKotynia cf50968
fix: retry service calls with timeout
MagdalenaKotynia 7c2130d
fix: remove redundant version specification from init
MagdalenaKotynia 11ec55d
license: changed date to 2025
MagdalenaKotynia 38f19a1
refactor: moved conversion from ros2 Pose to PoseModel to utils
MagdalenaKotynia 1d651ef
refactor: removed try except having no effect
MagdalenaKotynia cefaa89
refactor: renamed SceneConfig to SimulationConfig to better reflect i…
MagdalenaKotynia 442836c
fix: renamed missed scene_config occurencies to simulation_config
MagdalenaKotynia 616cc95
fix: renamed missed scene_config to simulation_config
MagdalenaKotynia cdc9a78
ci: pre-commit
MagdalenaKotynia 85ca90c
refactor: SimulationConfig as base class storing configurable attribu…
MagdalenaKotynia d250f02
chore: remove print used for debugging
MagdalenaKotynia 1376cc8
license: add missing license
MagdalenaKotynia 1456900
refactor: use pathlib.Path instead of str type
MagdalenaKotynia 70ad1c8
feat: add method to get current scene state, refactored spawned entit…
MagdalenaKotynia 07fbd23
docs: precise the SceneState docs
MagdalenaKotynia 5ca90c9
refactor: separated running binary from running robotic stack
MagdalenaKotynia c3d33a3
feat: add check if the entities names are unique
MagdalenaKotynia 60f5f67
refactor: remove despawned entity from spawned_entities list directly
MagdalenaKotynia 738eeff
refactor: ranamed O3DEngineCOnnector to O3DExROS2Connector and O3DESi…
MagdalenaKotynia 3c7d17e
chore: minor code reorganization
MagdalenaKotynia b1e8ded
refactor: add file left after renaming classes
MagdalenaKotynia a76726c
chore: launch file cleanup
MagdalenaKotynia 15d0050
refactor: renamed the EngineConnector to SimulationConnector
MagdalenaKotynia 22d1cdf
refactor: renamed engine_connector file to simulation_connector
MagdalenaKotynia b64e3c6
docs: added README
MagdalenaKotynia f59e97e
docs: minor changes in docstrings
MagdalenaKotynia f81585f
refactor: removed CONFIG_REGISTRY to not force user to modify source …
MagdalenaKotynia f658a4f
fix: add service errors handling
MagdalenaKotynia c25ca5e
refactor: moved loading configs to configs classes as classmethods
MagdalenaKotynia c4e2cbb
refactor: removed unnecesary variable
MagdalenaKotynia f5ac61b
fix: removed None as valid argument for _has_process_started method
MagdalenaKotynia 26a3b9f
fix: moved NOTEs outside docstrings
MagdalenaKotynia 23edbdc
fix: added error logging for exception in try_service_call
MagdalenaKotynia f9134bc
fix: revert missed change done for testing errors handling
MagdalenaKotynia 75336f9
refactor: moved conversion of ros2 pose to PoseModel to classmethod o…
MagdalenaKotynia 63e11b2
fix: workaround for bug in get_available_spawnable_names service
MagdalenaKotynia 6804a49
refactor: applied logging convention
MagdalenaKotynia 114799c
chore: add link to PR fixing the bug with get_available_spawnable_nam…
MagdalenaKotynia c7ed70c
chore: replaced link to PR with other PR
MagdalenaKotynia d23f42c
refactor: renamed the SimulationConnector to SimulationBridge to not …
MagdalenaKotynia e94c362
fix: add not changed import during renaming
MagdalenaKotynia 3652cdc
fix: remove redundant ros2_pose getting, modified raising error
MagdalenaKotynia 6c1244a
refactor: moved ros2 related methods outside simulation_bridge.py to …
MagdalenaKotynia cb50d43
refactor: moved spawned_entities to base SimulationBridge
MagdalenaKotynia d4aa378
Fix tf listener in rai_sim module (#428)
pijaro 6b07135
fix transform bug
jmatejcz 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,59 @@ | ||
# Copyright (C) 2025 Robotec.AI | ||
# | ||
# 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 | ||
8000 td> | # 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. | ||
|
||
from launch import LaunchDescription | ||
from launch.actions import ( | ||
IncludeLaunchDescription, | ||
) | ||
from launch.launch_description_sources import PythonLaunchDescriptionSource | ||
from launch_ros.actions import Node | ||
from launch_ros.substitutions import FindPackageShare | ||
|
||
|
||
# TODO (mkotynia) think about separation of launches | ||
def generate_launch_description(): | ||
launch_moveit = IncludeLaunchDescription( | ||
PythonLaunchDescriptionSource( | ||
[ | ||
"src/examples/rai-manipulation-demo/Project/Examples/panda_moveit_config_demo.launch.py", | ||
] | ||
) | ||
) | ||
|
||
launch_robotic_manipulation = Node( | ||
package="robotic_manipulation", | ||
executable="robotic_manipulation", | ||
# name="robotic_manipulation_node", | ||
output="screen", | ||
parameters=[ | ||
{"use_sim_time": True}, | ||
], | ||
) | ||
|
||
launch_openset = IncludeLaunchDescription( | ||
PythonLaunchDescriptionSource( | ||
[ | ||
FindPackageShare("rai_bringup"), | ||
"/launch/openset.launch.py", | ||
] | ||
), | ||
) | ||
|
||
return LaunchDescription( | ||
[ | ||
launch_openset, | ||
launch_moveit, | ||
launch_robotic_manipulation, | ||
] | ||
) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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,17 @@ | ||
## RAI Sim | ||
|
||
## Description | ||
|
||
The RAI Sim is a package providing interface to implement connection with a specific simulation. | ||
|
||
### Components | ||
|
||
- `SimulationConnector` - An interface for connecting with a specific simulation. It manages scene setup, spawning, despawning objects, getting current state of the scene. | ||
|
||
- `SimulationConfig` - base config class to specify the entities to be spawned. For each simulation connector there should be specified custom simulation config specifying additional parameters needed to run and connect with the simulation. | ||
|
||
- `SceneState` - stores the current info about spawned entities | ||
|
||
### Example implementation | ||
|
||
- `O3DExROS2Connector` - An implementation of SimulationConnector for working with simulation based on O3DE and ROS2. |
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,23 @@ | ||
[tool.poetry] | ||
name = "rai-sim" | ||
version = "0.0.1" | ||
description = "Package to run simulations" | ||
authors = ["Magdalena Kotynia <magdalena.kotynia@robotec.ai>", "Kacper Dąbrowski <kacper.dabrowski@robotec.ai>", "Jakub Matejczyk <jakub.matejczyk@robotec.ai>"] | ||
readme = "README.md" | ||
classifiers = [ | ||
"Programming Language :: Python :: 3", | ||
"Development Status :: 4 - Beta", | ||
"License :: OSI Approved :: Apache Software License", | ||
] | ||
packages = [ | ||
{ include = "rai_sim", from = "." }, | ||
] | ||
|
||
[tool.poetry.dependencies] | ||
python = "^3.10, <3.13" | ||
PyYAML = "*" | ||
|
||
|
||
[build-system] | ||
requires = ["poetry-core"] | ||
build-backend = "poetry.core.masonry.api" |
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,15 @@ | ||
# Copyright (C) 2025 Robotec.AI | ||
# | ||
# 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. | ||
|
||
"""RAI Simulations package.""" |
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.
🛠️ Refactor suggestion
Add version constraint for PyYAML dependency.
Using an unconstrained version (
*
) for dependencies can lead to compatibility issues when new versions are released. Consider adding a version constraint to ensure compatibility.📝 Committable suggestion