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

Launch empty simulation #27

Open
wants to merge 5 commits into
base: noah_webots
Choose a base branch
from
Open

Conversation

IDavGal
Copy link
Collaborator

@IDavGal 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.

@IDavGal IDavGal self-assigned this Apr 21, 2023
Copy link
Collaborator

@francocipollone francocipollone left a 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!

Comment on lines 13 to 31
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
Copy link
Collaborator

Choose a reason for hiding this comment

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

@@ -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.
Copy link
Collaborator

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


`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.
Copy link
Collaborator

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
Copy link
Collaborator

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.

Comment on lines 2 to 6
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
Copy link
Collaborator

Choose a reason for hiding this comment

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

please alphasort the imports

@francocipollone
Copy link
Collaborator

Is it ready to review?

@IDavGal
Copy link
Collaborator Author

IDavGal commented May 12, 2023

Is it ready to review?

Yes! Sorry for not tagging you

Copy link
Collaborator

@francocipollone francocipollone left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Collaborator

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.

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.

2 participants