Giter Site home page Giter Site logo

intellabs / scenario_execution Goto Github PK

View Code? Open in Web Editor NEW
11.0 3.0 2.0 14.25 MB

Scenario Execution for Robotics

Home Page: https://intellabs.github.io/scenario_execution

License: Apache License 2.0

Makefile 0.12% Python 95.70% ANTLR 1.55% CMake 0.28% C++ 2.08% Dockerfile 0.24% Shell 0.02%
gazebo robotics robotics-simulation ros2 scenario scenario-testing simulation

scenario_execution's Introduction

Scenario Execution

Super-Linter

Scenario execution is a backend- and middleware-agnostic library written in Python based on the generic scenario description language OpenSCENARIO 2 and pytrees. It reads a scenario definition from a file and then executes it, reusing available checks and actions. It is easily extendable through a library mechanism. This separation of the scenario definition from implementation massively reduces the manual efforts of scenario creation.

To give an impression of the functionality of scenario execution, the following animation shows an example scenario with a turtlebot-like robot in simulation using Nav2 and ROS as middleware to navigate towards a specified navigation goal in a simulated warehouse environment. Once the robot reaches a reference position a box is spawned in front of the robot as an unmapped static obstacle that needs to be avoided. Upon arrival of the goal position, the scenario ends and the simulation gets cleaned up.

scenario execution in action

Documentation

Please find the documentation here.

Setup

Installation from source as ROS 2 workspace

Clone this repository, update its submodules by running:

git submodule update --init

install the necessary dependencies:

rosdep install  --from-paths . --ignore-src
pip3 install -r requirements.txt

and build it

colcon build

How to run

First, build the packages:

colcon build
source install/setup.bash

To launch a scenario with ROS2:

ros2 launch scenario_execution_ros scenario_launch.py scenario:=examples/example_scenario/hello_world.osc live_tree:=True

scenario_execution's People

Contributors

abra00 avatar fmirus avatar fred-labs avatar georgepos avatar michaelbeale-il avatar nikhil-singhal-06 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

abra00 georgepos

scenario_execution's Issues

make scenario_variation and scenario_batch_execution executable

Is your feature request related to a problem? Please describe.
Scripts scenario_variation and scenario_batch_execution inside scenario_coverage package needs ros2 and python prefix to run respectively.

Describe the solution you'd like
Both the scripts could be stand alone executables to run directly from command line.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Navigation action does not stop properly with scenario_execution_control

Describe the bug
When controlling AMR navigation scenarios with scenario_execution_control via rviz and the user stops the scenario during execution of a navigation action, it is not properly stopped, but the robot continues to navigate to its goal although the scenario was already stopped. Hence, the cleanup function of the nav_to_pose action is not properly called in this case. The problem seems to be related to Threading in the scenario_runner.

To Reproduce
Run the scenario control example according to the corresponding tutorial and stop the scenario while the robot is navigating towards a goal.

Expected behavior
The robot should stop its current navigation mission immediately after the scenario is stopped from rviz.

Screenshots

scenario_control_nav_bug

Version information:

  • OS: Ubuntu 22.04
  • Version 1.0.0
  • ROS version: humble

run_external_process not usable from osc file

Describe the bug
Trying to use run_external_process() from a osc file fails
as it is said to be used in the helpers.osc as a string

To Reproduce
in a osc file use:
serial:
run_external_process() with:
keep(it.command == "ros2 run x y")

Expected behavior
an external command should be started successfully

Screenshots
If applicable, add screenshots to help explain your problem.

Version information (please complete the following information):

  • OS: [e.g. Ubuntu 22.04]
  • Version [e.g. 1.0.0]
  • ROS version: [e.g. humble]

Additional context
Add any other context about the problem here.

False text.xml output

If the scenario is not successful or is not executed properly, the generated test.xml file is sometimes incorrect and only contains testsuite tags.

test xml

Version information (please complete the following information):

  • OS: Ubuntu 22.04
  • ROS version: humble

Slow Parsing when using many imports.

Describe the bug
When using library imports, parsing get significantly slower.

To Reproduce
Use scenario with many large scenario library imports.

Expected behavior
Parsing finished within 2-3s.

log_check excpected message printed in rosout

Describe the bug
when using log_check to find a message in rosout, scenario_execution will print out
an instantiate action message containing the message that needs to be found in rosout

To Reproduce
use log_check in osc file and echo the rosout topic

Expected behavior
i think that the log_check should also look at the name field from rosout instead of just msg.msg

Screenshots
If applicable, add screenshots to help explain your problem.

Version information (please complete the following information):

  • OS: [e.g. Ubuntu 22.04]
  • Version [e.g. 1.0.0]
  • ROS version: [e.g. humble]

Additional context
Add any other context about the problem here.

create pip package of scenario_execution_base

Is your feature request related to a problem? Please describe.

Currently, we only offer how to run tutorials of scenario execution with ROS2. To support running scenario execution as standalone python library (without ROS 2), scenario_execution_base should be available as pip package in PyPi.

Describe the solution you'd like

Make scenario_execution_base available as pip package in PyPi and add corresponding section to the how to run page of the documentation.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.