From d1bdb8dcdfde98c54561745887d41f113da2b25c Mon Sep 17 00:00:00 2001 From: Borong Yuan Date: Wed, 15 Feb 2023 16:04:31 +0800 Subject: [PATCH] add spacenav example Signed-off-by: Borong Yuan --- .../launch/servo_spacenav_input.launch.py | 12 ++++++++++++ .../realtime_servo/realtime_servo_tutorial.rst | 7 +++++++ 2 files changed, 19 insertions(+) create mode 100644 doc/examples/realtime_servo/launch/servo_spacenav_input.launch.py diff --git a/doc/examples/realtime_servo/launch/servo_spacenav_input.launch.py b/doc/examples/realtime_servo/launch/servo_spacenav_input.launch.py new file mode 100644 index 0000000000..a2f2b16f40 --- /dev/null +++ b/doc/examples/realtime_servo/launch/servo_spacenav_input.launch.py @@ -0,0 +1,12 @@ +from launch import LaunchDescription +from launch_ros.actions import Node + + +def generate_launch_description(): + return LaunchDescription([ + Node(package='spacenav', executable='spacenav_node', + name='spacenav', namespace='', output='screen', + parameters=[{'zero_when_static': True, + 'use_twist_stamped': True}], + remappings=[('spacenav/twist', 'servo_node/delta_twist_cmds')]), + ]) diff --git a/doc/examples/realtime_servo/realtime_servo_tutorial.rst b/doc/examples/realtime_servo/realtime_servo_tutorial.rst index 53b3b14d5b..05db27e6c8 100644 --- a/doc/examples/realtime_servo/realtime_servo_tutorial.rst +++ b/doc/examples/realtime_servo/realtime_servo_tutorial.rst @@ -31,6 +31,13 @@ Make a service request to start Servo :: You should be able to control the arm with your controller now, with MoveIt Servo automatically avoiding singularities and collisions. +Using a SpaceMouse +^^^^^^^^^^^^^^^^^^^^ + +If you have a 3Dconnexion SpaceMouse, you can send 6DoF Cartesian commands using a single joystick. With the demo still running, in a new terminal, run :: + + ros2 launch moveit2_tutorials servo_spacenav_input.launch.py + Without a Controller ^^^^^^^^^^^^^^^^^^^^