-
Notifications
You must be signed in to change notification settings - Fork 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
Launch empty simulation #27
base: noah_webots
Are you sure you want to change the base?
Conversation
IDavGal
commented
Apr 21, 2023
- Added a world and launch files to be able to launch a webots simulation using ROS 2 commands.
- The launchfile contains the basic commands to launch webots and the ROS2Supervisor node, used to expand Webots features with ROS 2.
- A README is added to the package to keep track of the added features and changes.
Signed-off-by: IDavGal <[email protected]>
Signed-off-by: IDavGal <[email protected]>
Signed-off-by: IDavGal <[email protected]>
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.
Good job! I haven't tried this locally but I will!
docker/Dockerfile
Outdated
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
libxtst6 \ | ||
python3-pip \ | ||
python3-tk \ | ||
software-properties-common \ | ||
xcb \ | ||
wget && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# Add key and repository | ||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
ffmpeg \ | ||
libssh-dev \ | ||
libzip-dev \ | ||
libxerces-c-dev \ | ||
libfox-1.6-dev \ | ||
libgdal-dev \ | ||
libproj-dev \ | ||
libgl2ps-dev |
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.
noah_webots/README.md
Outdated
@@ -0,0 +1,11 @@ | |||
## Noah Webots package | |||
|
|||
This package should contain all the necessary resources to launch a Webots simulation with the capacity to import and spawn a Noah robot from the `noah_description` package. |
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.
remove should. It makes the package to be not trusty haha
noah_webots/README.md
Outdated
|
||
`ros2 launch noah_webots noah_webots.launch.py` | ||
|
||
This should start Webots and load the world `myWorld` stored in `/worlds`, along with a Supervisor Node provided by `webots_ros2` called `Ros2Supervisor`. This is a special Supervisor node that interacts with the simulation, allowing different features such as publishing the `/clock` topic, or spawning a robot from a URDF file. This node will be useful when importing an URDF robot in a running simulation. |
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.
Remove the initial should
@@ -0,0 +1,37 @@ | |||
import os |
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.
Add the license description at the top
BSD 3-Clause License
Copyright (c) 2023, Ekumen Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import pathlib | ||
import launch | ||
from launch_ros.actions import Node | ||
from ament_index_python.packages import get_package_share_directory | ||
from webots_ros2_driver.webots_launcher import WebotsLauncher |
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.
please alphasort the imports
Signed-off-by: IDavGal <[email protected]>
Signed-off-by: IDavGal <[email protected]>
Is it ready to review? |
Yes! Sorry for not tagging you |
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.
LGTM!
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.
Is the name of the file following any guideline? CC @BarceloChristian in case there are common guidelines for webots worlds.