Hood NUC ROS2 Joystick 202004

From wikidb
Jump to: navigation, search

References

References Used in this Test

Other References

Installation

install pip

I had to install pip first. I installed pip3 first. I don't need it at this time.

TBD: move this documentation some place else

NOTE: see log below for details

 $ sudo apt-get install python-pip

Install ds4drv

 $ sudo pip install ds4drv

NOTE: see log below for details

Execute

PRECONDIONS

  • Logitech Dual Action G-UF13A (PID VV811) plugged into USB Hub

TERMINAL 1

 $ ros2 launch turtlebot3_bringup robot.launch.py

Not required? TERMINAL 2

 $ sudo ds4drv
     [info][controller 1] Created devices /dev/input/js1 (joystick) /dev/input/event12 (evdev) 
     [info][bluetooth] Scanning for devices

TERMINAL 3

 $ ll /dev/input/js*
     crw-rw-r--+ 1 root input 13, 0 Apr  7 10:13 /dev/input/js0
     crw-rw-r--+ 1 root input 13, 1 Apr  7 10:36 /dev/input/js1
 $ ros2 run joy joy_node
     [INFO] [joy_node]: Opened joystick: /dev/input/js0. deadzone_: 0.050000.

TERMINAL 4

 $ ros2 run teleop_twist_joy teleop_node
     [INFO] [TeleopTwistJoy]: Teleop enable button 5.
     [INFO] [TeleopTwistJoy]: Linear axis x on 5 at scale 0.500000.
     [INFO] [TeleopTwistJoy]: Angular axis yaw on 2 at scale 0.500000.

Execute

Tests

 $ ros2 topic echo /joy
     header:
       stamp:
         sec: 1586281864
         nanosec: 261368786
       frame_id: joy
     axes: [-0.0, -0.0, -0.0, -0.0, -0.0, -0.0]
     buttons: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
     ---
     header:
       stamp:
     ...

Tools

 $ rqt 
  • menu Plugins -> item Topics -> Topic Monitor

Results

  • Hold down button "6" (internally referenced as 5)
  • use right controller.
  • Currently only works for angular z control
  • Motors turn, TB3 only rotates
  • TBD: fix - is there a configuration of parameter files someplace?


looking for help


  • TB3 joy stick parameters may share issues with the Open Manipulator Joy stick

Logs