Skip to content

Commit

Permalink
leanup
Browse files Browse the repository at this point in the history
  • Loading branch information
fred-labs committed Oct 2, 2024
1 parent 49f294a commit 8d849fb
Show file tree
Hide file tree
Showing 10 changed files with 148 additions and 8 deletions.
29 changes: 29 additions & 0 deletions dependencies/scenario_execution_py_trees_ros/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
Software License Agreement (BSD License)

Copyright (c) 2024 Intel Labs
Copyright (c) 2015 Daniel Stonier

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

* 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.

* 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.
3 changes: 3 additions & 0 deletions dependencies/scenario_execution_py_trees_ros/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Scenario Execution Py Trees ROS

This package provides the latest [`py_trees_ros.trees.BehaviourTree`](https://github.com/splintered-reality/py_trees_ros/blob/247cf47d509f827bb24464be376e8ed2ddefc0fb/py_trees_ros/trees.py#L216) that is not yet part of a release package.
16 changes: 16 additions & 0 deletions dependencies/scenario_execution_py_trees_ros/package.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>scenario_execution_py_trees_ros</name>
<version>1.2.0</version>
<description>Fixes in py-trees-ros not yet release</description>
<author email="[email protected]">Intel Labs</author>
<maintainer email="[email protected]">Intel Labs</maintainer>
<license file="LICENSE">BSD-3-Clause</license>

<exec_depend>py_trees_ros</exec_depend>

<export>
<build_type>ament_python</build_type>
</export>
</package>
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Software License Agreement (BSD License)
#
# Copyright (c) 2024 Intel Labs

# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:

# * Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.

# * 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.

# * 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.
#
# SPDX-License-Identifier: BSD-3-Clause

from . import trees
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Software License Agreement (BSD License)
#
# Copyright (c) 2024 Intel Labs
# Copyright (c) 2015 Daniel Stonier
# All rights reserved.
#
Expand Down Expand Up @@ -29,6 +30,8 @@
# 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.
#
# SPDX-License-Identifier: BSD-3-Clause

import typing

Expand All @@ -38,15 +41,15 @@
import rclpy

from py_trees_ros import blackboard
from py_trees_ros import conversions
from py_trees_ros import exceptions
from py_trees_ros import utilities
from py_trees_ros import visitors
from py_trees_ros.trees import BehaviourTree as BehaviourTreeRos
from py_trees_ros_trees import SnapshotStream

from py_trees_ros.trees import BehaviourTree
from py_trees_ros.trees import SnapshotStream


class BehaviourTree(BehaviourTreeRos):
class BehaviourTreeKwargs(BehaviourTree):
"""
Extend the :class:`py_trees_ros.trees.BehaviourTree` class with a required feature that is not yet available
as a release.
Expand Down Expand Up @@ -198,7 +201,8 @@ def setup(
# Behaviours
########################################
try:
super().setup(
py_trees.trees.BehaviourTree.setup(
self,
timeout=setup_timeout,
visitor=visitor,
node=self.node,
Expand Down
4 changes: 4 additions & 0 deletions dependencies/scenario_execution_py_trees_ros/setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[develop]
script_dir=$base/lib/scenario_execution_py_trees_ros
[install]
install_scripts=$base/lib/scenario_execution_py_trees_ros
51 changes: 51 additions & 0 deletions dependencies/scenario_execution_py_trees_ros/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Software License Agreement (BSD License)
#
# Copyright (c) 2024 Intel Labs

# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:

# * Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.

# * 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.

# * 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.
#
# SPDX-License-Identifier: BSD-3-Clause

""" Setup python package """
from setuptools import find_namespace_packages, setup

PACKAGE_NAME = 'scenario_execution_py_trees_ros'

setup(
name=PACKAGE_NAME,
version='1.2.0',
packages=find_namespace_packages(),
data_files=[
('share/ament_index/resource_index/packages',
['resource/' + PACKAGE_NAME]),
('share/' + PACKAGE_NAME, ['package.xml'])
],
zip_safe=True,
maintainer='Intel Labs',
maintainer_email='[email protected]',
description='Scenario Execution library for Gazebo',
license='BSD-3-Clause',
)
1 change: 1 addition & 0 deletions scenario_execution_ros/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<exec_depend>py_trees</exec_depend>
<exec_depend>py_trees_ros</exec_depend>
<exec_depend>py_trees_ros_interfaces</exec_depend>
<exec_depend>scenario_execution_py_trees_ros</exec_depend>
<exec_depend>visualization_msgs</exec_depend>
<exec_depend>xacro</exec_depend>
<exec_depend>rcl_interfaces</exec_depend>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
""" Main entry for scenario_execution_ros """
import sys
import rclpy # pylint: disable=import-error
import py_trees_ros # pylint: disable=import-error
import scenario_execution_py_trees_ros
from py_trees_ros_interfaces.srv import OpenSnapshotStream
from scenario_execution import ScenarioExecution, ShutdownHandler
from .logging_ros import RosLogger
Expand Down Expand Up @@ -92,9 +92,9 @@ def setup_behaviour_tree(self, tree):
tree [py_trees.behaviour.Behaviour]: root of the behaviour tree
return:
py_trees_ros.trees.BehaviourTree
scenario_execution_py_trees_ros.trees.BehaviourTreeKwargs
"""
return py_trees_ros.trees.BehaviourTree(tree)
return scenario_execution_py_trees_ros.trees.BehaviourTreeKwargs(tree)

def post_setup(self):
request = OpenSnapshotStream.Request()
Expand Down

0 comments on commit 8d849fb

Please sign in to comment.