Skip to content

Commit 076540a

Browse files
authored
Add Tesla example (#206)
* Add Tesla example * Update test.yml * Ignore * Exclude imports * Improve simulation file
1 parent d4dd5b0 commit 076540a

File tree

29 files changed

+1891
-11
lines changed

29 files changed

+1891
-11
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
jobs:
88
industrial_ci:
99
strategy:
10+
fail-fast: false
1011
matrix:
1112
ROS_REPO: [main, testing]
1213
ROS_DISTRO: [foxy, rolling]

webots_ros2/package.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
<exec_depend>webots_ros2_examples</exec_depend>
2222
<exec_depend>webots_ros2_importer</exec_depend>
2323
<exec_depend>webots_ros2_msgs</exec_depend>
24+
<exec_depend>webots_ros2_tesla</exec_depend>
2425
<exec_depend>webots_ros2_tiago</exec_depend>
2526
<exec_depend>webots_ros2_turtlebot</exec_depend>
2627
<exec_depend>webots_ros2_tutorials</exec_depend>

webots_ros2_core/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
setup(
1313
name=package_name,
1414
version='1.0.5',
15-
packages=[package_name, package_name + '.devices', package_name + '.math'],
15+
packages=[package_name, package_name + '.devices', package_name + '.math', package_name + '.webots'],
1616
data_files=data_files,
1717
install_requires=['setuptools', 'launch'],
1818
zip_safe=True,

webots_ros2_core/test/test_flake8.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@
2222
@pytest.mark.linter
2323
def test_flake8():
2424
rc = main(argv=[
25-
'--linelength', '128', '--exclude', 'webots_ros2_core/math/quaternions.py', 'webots_ros2_core/webots_controller.py'
25+
'--linelength', '128', '--exclude', 'webots_ros2_core/math/quaternions.py'
2626
])
2727
assert rc == 0, 'Found errors'

webots_ros2_core/test/test_pep257.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@
2121
@pytest.mark.linter
2222
@pytest.mark.pep257
2323
def test_pep257():
24-
rc = main(argv=['.', '--exclude', 'webots_ros2_core/math/quaternions.py', 'webots_ros2_core/webots_controller.py'])
24+
rc = main(argv=['.', '--exclude', 'webots_ros2_core/math/quaternions.py'])
2525
assert rc == 0, 'Found code style errors / warnings'

webots_ros2_core/webots_ros2_core/devices/device_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
from .light_sensor_device import LightSensorDevice
2525
from .robot_device import RobotDevice
2626
from .imu_device import ImuDevice
27-
from webots_ros2_core.webots_controller import Node
27+
from webots_ros2_core.webots.controller import Node
2828

2929

3030
class DeviceManager:

webots_ros2_core/webots_ros2_core/joint_state_publisher.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
from sensor_msgs.msg import JointState
1818
from rclpy.time import Time
19-
from webots_ros2_core.webots_controller import Node
19+
from webots_ros2_core.webots.controller import Node
2020

2121

2222
class JointStatePublisher:

webots_ros2_core/webots_ros2_core/trajectory_follower.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
from trajectory_msgs.msg import JointTrajectoryPoint
2121
from rclpy.duration import Duration
2222
from rclpy.action import ActionServer, CancelResponse, GoalResponse
23-
from webots_ros2_core.webots_controller import Node
23+
from webots_ros2_core.webots.controller import Node
2424

2525

2626
def to_s(duration):
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Copyright 1996-2021 Cyberbotics Ltd.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.

webots_ros2_core/webots_ros2_core/webots_controller.py renamed to webots_ros2_core/webots_ros2_core/webots/controller.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@
2424
raise e
2525

2626
# deepcode ignore W0401,C0413: This module is just a proxy to `controller`
27-
from controller import *
27+
from controller import * # noqa: F401,F403

0 commit comments

Comments
 (0)