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

ROS2 port #35

Merged
merged 40 commits into from
Sep 3, 2019
Merged
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
853d104
ROS2 port
artivis Jun 25, 2019
8607140
key_teleop pkg format 3
artivis Jun 25, 2019
699466f
port teleop_tools_msgs
artivis Jun 25, 2019
15a8274
key_teleop catch KeyboardInterrupt
artivis Jun 26, 2019
b23c8c0
port mouse_teleop
artivis Jun 26, 2019
a0629b2
wip port joy_teleop
artivis Jun 26, 2019
561a446
add key_teleop.yaml
artivis Jun 28, 2019
252834b
fix msg cmake & pkg.xml
artivis Jul 2, 2019
77f51a5
wip port joy_teleop
artivis Jul 2, 2019
057d387
wip port joy_teleop
artivis Jul 2, 2019
7f58dd2
wip port joy_teleop
artivis Jul 2, 2019
22bb31f
prepare tests
artivis Jul 2, 2019
27d2148
add xmllint test
artivis Jul 2, 2019
a5e3068
fix xmllint tests
artivis Jul 2, 2019
9fa45c5
simplify joy_teleop retrieve_config
artivis Jul 4, 2019
02f5fd5
todo tests
artivis Jul 4, 2019
809adba
rename test
artivis Jul 4, 2019
3ec6f93
remove useless class KeyTeleop
artivis Jul 4, 2019
9d011d3
rm wip tests
artivis Jul 12, 2019
93905e0
rm comment
artivis Jul 12, 2019
8ef0c07
Fixes for dynamic topic joy publishers
Jul 16, 2019
d1bea54
Merge pull request #1 from IanTheEngineer/dashing-topic-fixes
artivis Aug 2, 2019
10a69bd
typo
artivis Aug 3, 2019
8b279d6
on-liner
artivis Aug 3, 2019
aae10ce
rm comments
artivis Aug 3, 2019
8289774
rm comments
artivis Aug 3, 2019
56fcb4b
multi-buttons example
artivis Sep 3, 2019
904a721
rm hardcoded sleep
artivis Sep 3, 2019
8243202
rename test file
artivis Sep 3, 2019
3e138a9
fix flake8 test
artivis Sep 3, 2019
966cdb3
fix test name
artivis Sep 3, 2019
41dbee1
fix mouse teleop tests
artivis Sep 3, 2019
7fc69f0
fix key_teleop tests
artivis Sep 3, 2019
74d60a3
rm ros1 launch
artivis Sep 3, 2019
6980646
rm joy test while working at it
artivis Sep 3, 2019
3d21b54
cleanup
artivis Sep 3, 2019
aa6e406
joy teleop test depend cleanup
artivis Sep 3, 2019
fc31d75
cleanup
artivis Sep 3, 2019
04f614d
reduce copy/pasta
artivis Sep 3, 2019
fd5fde8
reduce copy/pasta
artivis Sep 3, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions joy_teleop/CMakeLists.txt

This file was deleted.

212 changes: 106 additions & 106 deletions joy_teleop/config/joy_teleop_example.yaml
Original file line number Diff line number Diff line change
@@ -1,115 +1,115 @@
teleop:
walk:
type: topic
message_type: geometry_msgs/Twist
topic_name: cmd_vel
deadman_buttons: [4]
axis_mappings:
-
axis: 1
target: linear.x
scale: 0.5
offset: -0.03
-
axis: 0
target: angular.z
scale: 0.5
-
axis: 2
target: linear.y
scale: 0.3
-
button: 2
target: linear.z
scale: 3.0
joy_teleop:
ros__parameters:

force_push:
type: topic
message_type: geometry_msgs/Wrench
topic_name: base_link_wrench
deadman_buttons: [5, 7]
axis_mappings:
-
axis: 3
target: force.x
scale: 40
-
axis: 2
target: force.y
scale: 40
walk:
type: topic
interface_type: geometry_msgs/msg/Twist
topic_name: cmd_vel
deadman_buttons: [4]
axis_mappings:
linear-x:
axis: 1
scale: 0.5
offset: -0.03
angular-z:
axis: 0
scale: 0.5
linear-y:
axis: 2
scale: 0.3
linear-z:
button: 2
scale: 3.0

stop_everything:
type: action
action_name: stop_joints
buttons: [4, 5, 6, 7]
force_push:
type: topic
interface_type: geometry_msgs/msg/Wrench
topic_name: base_link_wrench
deadman_buttons: [5, 7]
axis_mappings:
force-x:
axis: 3
scale: 40
force-y:
axis: 2
scale: 40

torso_up:
type: action
action_name: /torso_controller/increment
action_goal:
increment_by: [0.05]
buttons: [4]
stop:
type: topic
interface_type: geometry_msgs/msg/Twist
topic_name: cmd_vel
deadman_buttons: [0, 2]
message_value:
linear-x:
value: 0.0
angular-z:
value: 0.0
linear-y:
value: 0.0

torso_down:
type: action
action_name: /torso_controller/increment
action_goal:
increment_by: [-0.05]
buttons: [6]
hello:
type: topic
interface_type: std_msgs/msg/String
topic_name: chatter
deadman_buttons: [2]
message_value:
data:
value: 'Hello'

stop:
type: topic
message_type: geometry_msgs/Twist
topic_name: cmd_vel
deadman_buttons: [0, 2]
message_value:
-
target: linear.x
value: 0.0
-
target: angular.z
value: 0.0
-
target: linear.y
value: 0.0
array:
type: topic
interface_type: std_msgs/msg/UInt8MultiArray
topic_name: bytes
deadman_buttons: [5]
message_value:
data:
value: [1,3,3,7]

hello:
type: topic
message_type: std_msgs/String
topic_name: chatter
deadman_buttons: [1]
message_value:
-
target: data
value: 'Hello'
array2:
type: topic
interface_type: std_msgs/msg/UInt8MultiArray
topic_name: bytes
deadman_buttons: [3]
message_value:
data:
value:
- 4
- 2

array:
type: topic
message_type: std_msgs/UInt8MultiArray
topic_name: bytes
deadman_buttons: [5]
message_value:
-
target: data
value: [1,3,3,7]
# stop_everything:
artivis marked this conversation as resolved.
Show resolved Hide resolved
# type: action
# action_name: stop_joints
# buttons: [4, 5, 6, 7]

array2:
type: topic
message_type: std_msgs/UInt8MultiArray
topic_name: bytes
deadman_buttons: [3]
message_value:
-
target: data
value:
- 4
- 2
torso_up:
type: action
interface_type: teleop_tools_msgs/action/Increment
action_name: torso_controller/increment
action_goal:
increment_by: [0.05]
buttons: [4]

add_two_ints:
type: service
service_name: /add_two_ints
service_request:
a: 11
b: 31
service_persistent: False # False by default
buttons: [10]
torso_down:
type: action
interface_type: teleop_tools_msgs/action/Increment
action_name: torso_controller/increment
action_goal:
increment_by: [-0.05]
buttons: [6]

fibonacci:
type: action
interface_type: action_tutorials/action/Fibonacci
action_name: fibonacci
action_goal:
order: 5
buttons: [1]

add_two_ints:
type: service
interface_type: example_interfaces/srv/AddTwoInts
service_name: add_two_ints
service_request:
a: 11
b: 31
buttons: [10]
47 changes: 47 additions & 0 deletions joy_teleop/launch/example.launch.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Copyright 2019 Canonical, Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import os

import launch.actions
import launch_ros.actions

from ament_index_python.packages import get_package_share_directory
from launch import LaunchDescription

# Please note that this is only an example!
# It is not guaranteed to work with your setup but can be used as a starting point.


def generate_launch_description():

parameters_file = os.path.join(
get_package_share_directory('joy_teleop'),
'config', 'joy_teleop_example.yaml'
)

ld = LaunchDescription([
launch.actions.DeclareLaunchArgument('cmd_vel', default_value='input_joy/cmd_vel'),
launch.actions.DeclareLaunchArgument('teleop_config', default_value=parameters_file),
])

ld.add_action(launch_ros.actions.Node(
package='joy_teleop', node_executable='joy_teleop',
parameters=[launch.substitutions.LaunchConfiguration('teleop_config')]))

ld.add_action(launch_ros.actions.Node(
package='joy_teleop', node_executable='incrementer_server',
node_name='incrementer', node_namespace='torso_controller'))

return ld
29 changes: 21 additions & 8 deletions joy_teleop/package.xml
Original file line number Diff line number Diff line change
@@ -1,20 +1,33 @@
<?xml version="1.0"?>
<package>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
artivis marked this conversation as resolved.
Show resolved Hide resolved
<package format="3">
<name>joy_teleop</name>
<version>0.3.0</version>
<description>A (to be) generic joystick interface to control a robot</description>

<maintainer email="bence.magyar.robotics@gmail.com">Bence Magyar</maintainer>
<license>BSD</license>

<author email="paul.mathieu@pal-robotics.com">Paul Mathieu</author>

<license>BSD</license>
<exec_depend>rclpy</exec_depend>
<exec_depend>sensor_msgs</exec_depend>
<exec_depend>teleop_tools_msgs</exec_depend>
<exec_depend>trajectory_msgs</exec_depend>

<buildtool_depend>catkin</buildtool_depend>
<test_depend>ament_copyright</test_depend>
<test_depend>ament_flake8</test_depend>
<test_depend>ament_pep257</test_depend>
<test_depend>ament_xmllint</test_depend>
<test_depend>python3-pytest</test_depend>
<test_depend>ros_lauch</test_depend>
<test_depend>demo_nodes_cpp</test_depend>
<test_depend>action_tutorials</test_depend>
<test_depend>sensor_msgs</test_depend>
<test_depend>std_msgs</test_depend>

<run_depend>actionlib</run_depend>
<run_depend>sensor_msgs</run_depend>
<run_depend>rospy</run_depend>
<run_depend>rostopic</run_depend>
<run_depend>teleop_tools_msgs</run_depend>
<export>
<build_type>ament_python</build_type>
</export>

</package>
Empty file added joy_teleop/scripts/__init__.py
Empty file.
Loading