-
 
No version for distro humble. Known supported distros are highlighted in the buttons above.
No version for distro jazzy. Known supported distros are highlighted in the buttons above.
No version for distro rolling. Known supported distros are highlighted in the buttons above.

Package Summary

Tags No category tags.
Version 0.1.18
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/jsk-ros-pkg/jsk_control.git
VCS Type git
VCS Version master
Last Updated 2024-12-09
Dev Status DEVELOPED
CI status Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

jsk_teleop_joy

Additional Links

Maintainers

  • Ryohei Ueda

Authors

  • Ryohei Ueda

jsk_teleop_joy package

Introduction

This package provides physical UI for teleoperatoin such as joy sticks, game controllers and MIDI instruments.

Supported game controllers

This package supports following game controllers:

  1. XBox360 controller
  2. PS3 Controller (Bluetooth)
  3. PS3 Controller (USB)

In order to use PS3 controller via Bluetooth, see this instruction.

Architecture of jsk_teleop_joy

jsk_teleop_joy (the main script is joy_main.py) is based on plugin architecture.

ROS packages provides the plugins for jsk_teleop_joy and each plugin represents a function such as “specify 6D pose of the end effector”.

You can enable some plugins and choose which plugin you want to use by “Pushing Select Button”.

jsk_teleop_joy plugins out of box

  • VerboseStatus
  • JoyPose6D
  • JoyFootstep
  • JoyFootstepPlanner
  • JoyFootstepPlannerDemo
  • JoyMoveIt
  • JoyGoPos

How to implement a plugin

  1. write xml file to define plugins.
  2. Export the xml file from your ROS package using manifest.xml or package.xml.
  3. implement plugin

Write xml file to define plugins

jsk_teleop_joy reads the plugin definition from a xml file like plugin.xml.

That xml should be like:

<library>
  <class name="Foo" type="your_package.foo">
  </class>
</library>

The xml file should have <library> tag at the top level. And you can define plugins by <class> tag.

  • name attribute means the name of the plugin. You will choose plugins by this name in your launch files (example).
  • type attribute means the python class of the plugin. jsk_teleop_joy tries to instantiate plugin class using thie type name.

Export the xml file from your ROS package

You need to export that xml file using <export> tag and <jsk_teleop_joy> tag in your manifest.xml or package.xml.

These two files, manifest.xml, package.xml, are good examples.

Implement a plugin

Finally, you can implement a jsk_teleop_joy plugin.

VerboseStatus Plugin is a good example how to implement a plugin.

__init__ method

All the plugins are required to inherits jsk_teleop_joy.joy_plugin.JSKJoyPlugin and call JSKJoyPlugin.__init__ in its __init__ constructor.

class VerboseStatus(jsk_teleop_joy.joy_plugin.JSKJoyPlugin):
  def __init__(self):
    jsk_teleop_joy.joy_plugin.JSKJoyPlugin.__init__(self, 'VerbosePlugin')

joyCB method

Each time jsk_teleop_joy receives /joy message, it calls joyCB method of the active plugin.

  def joyCB(self, status, history):
    rospy.loginfo('analog left (%f, %f)' % (status.left_analog_x, status.left_analog_y))

The 2nd argument of joyCB is an instance of JoyStatus. JoyStatus is one of XboxStatus, PS3Status and PS3WiredStatus. This means the latest message from /joy. These 3 classes provide the same interface and you don’t need to care about which controller the user uses.

On the other hand, the 3rd argument of joyCB (history), is a sequence of JoyStatus. it’s an instance of StatusHistory. It means a hisotry of recent JoyStatus.

SELECT button

jsk_teleop_joy system occupies SELECT button so you cannot use SELECT button in your plugin. SELECT button is used for switching plugins.

MIDI controllers

interactive_midi_config.py

You can configure MIDI devices by this script interactively. movie

  1. Connect you MIDI device.
  2. First, the script asks the name of device, please choose the device you want to use.
  3. Second, please push the buttons/slide the faders in the order you want to get as sensor_msgs/Joy. The script maps those buttons to sensor_msgs/Joy/axes (and sensor_msgs/Joy/buttons if possible).
  4. Please type q to quit. And the configure will be saved into /tmp/midi.yaml.
  • Troubleshooting:

For Ubuntu18.04 and pygame2.0.1 installed by pip, python -c "import pygame.midi; pygame.midi.init()" returns error below;

 ALSA lib conf.c:3558:(snd_config_hooks_call) Cannot open shared library libasound_module_conf_pulse.so (/usr/lib/alsa-lib/libasound_module_conf_pulse.so: libasound_module_conf_pulse.so: cannot open shared object file: No such file or directory)
ALSA lib seq.c:935:(snd_seq_open_noupdate) Unknown SEQ default

In this case, you need to get pygame from apt i.e pip uninstall pygame && apt-get install python-pygame

NOT RECOMMENDED: Or if you really want to keep using pip installed pygame, you can make symbolic link i.e. ln -s /usr/lib/x86_64-linux-gnu/alsa-lib /usr/lib/alsa-lib: BUT WE DO NOT RECOMMED

midi_write.py

In order to control LEDs and active faders, need to output some MIDI commands from you computer. The script midi_write.py helps to dig the command and you can save the configuration to a yaml file by -w option.

midi_config_player.py

This script publishes sensor_msgs/Joy to /joy based on a yaml file configured by interactive_midi_config.py and midi_write.py.

configs directory includes some yaml files for several MIDI devices.

CHANGELOG

Changelog for package jsk_teleop_joy

0.1.18 (2024-12-09)

  • [jsk_teleop_joy] support midi launchpad X (#789)
  • [jsk_teleop_joy] python3-pygame is required on noetic (#787)
  • Contributors: Shun Hasegawa, Yoshiki Obinata

0.1.17 (2023-05-28)

0.1.16 (2022-10-27)

  • fix for python3 (#776)
  • add from __future_ import print_function (#773)
  • [README.md] delete pip instruction and recommend apt version only (#760)
  • fix for python3 (#763)
    • 2to3 -w -fexcept .
    • 2to3 -w -fprint .
    • update readme
    • Update jsk_teleop_joy/README.md
  • Add ipega controller support (#716)
    • Fixed a key setting mistake. Add controller_type ipega as a possible input for joy_status
    • Add ipega controller support
  • Contributors: Shingo Kitagawa, Iki Yo, Kei Okada, Yoichiro Kawamura

0.1.15 (2018-05-16)

  • Merge pull request #693 from k-okada/fix_apt_slow remove unused build_depends
  • remove unused build_depends
  • Contributors: Kei Okada

0.1.14 (2018-01-15)

0.1.13 (2017-04-18)

  • [jsk_footstep_planner, jsk_teleop_joy] add stack mode to footstep_marker
  • [jsk_teleop_joy] Remove / from default frame_id in pose6d plugin
  • [jsk_teleop_joy] update view control in rviz using teleop_joy
  • Contributors: Yohei Kakiuchi

0.1.12 (2017-02-22)

0.1.11 (2017-02-09)

0.1.10 (2016-12-15)

  • [jsk_teleop_joy] package.xml : add pygame run depend (#657)
  • Add toggle footstep marker mode joy interface (#607)
    • src/jsk_teleop_joy/plugin/joy_footstep_marker.py: Add joy interface to toggle planning mode
  • Add plugin to send cmd_vel from joystick contorller (#600)
    • [jsk_teleop_joy] src/jsk_teleop_joy/joy.py : Add plugin_package option to JoyManager to use joy plugins in other packages
    • [jsk_teleop_joy] src/jsk_teleop_joy/plugin/joy_cmd_vel.py : Add orthogonal_axis_mode, which does not allow diagonal movement
    • [jsk_teleop_joy] src/jsk_teleop_joy/plugin/joy_cmd_vel.py : Add plugin to send cmd_vel from joystick contorller
  • Add utility tools for jaxon footstep planner (#598)
    • [jsk_footstep_planner] launch/joy_footstep_marker.launch : Add joy_footstep_marker launch, which control footstep_marker from joystick controller
  • Project odom_init to detected floor (#579)
    • [jsk_teleop_joy] Check result of service call by exception handling
    • [jsk_teleop_joy] Display OverlayMenu before execute footstep
    • [jsk_teleop_joy] sync pre_pose in joy_footstep_marker only at first of the pose update sequence
    • [jsk_teleop_joy] Add marker_name arg to getCurrentMarkerPose and initialize marker by initial_footstep_marker in reset process
    • [jsk_teleop_joy] Add footstep marker synchonization to joy_footstep_marker
    • [jsk_teleop_joy] Add joycontroller interface plugin for footstep_marker
  • Contributors: Kanae Kochigami, Iory Kumagai

0.1.9 (2016-03-23)

0.1.8 (2015-11-02)

0.1.7 (2015-11-01)

  • [jsk_teleop_joy/joy_relative_converter.py] add reset command
  • [jsk_teleop_joy/scripts/joy_relative_converter.py] fix bug to support buttons
  • Revert "[jsk_teleop_joy/scripts/joy_relative_converter.py] fix bug to support buttons" This reverts commit 1704b24d2b96aae962e4c87968f68078442417a2.
  • [jsk_teleop_joy/scripts/joy_relative_converter.py] fix bug to support buttons
  • put most process into class method Conflicts: jsk_teleop_joy/scripts/joy_relative_converter.py
  • instantiate before subscribe Conflicts: jsk_teleop_joy/scripts/joy_relative_converter.py
  • fix bug around page-change
  • implement page-change
  • add joy_relative_converter
  • [jsk_footstep_controller, jsk_teleop_joy] Use footstep-controller.l and lock/unlock furutaractive model during exeucuting footsteps
  • Remove manifest.xml and Makefile and use catkin style filesystem
  • Contributors: Ryohei Ueda, Satoshi Iwaishi

0.1.6 (2015-06-11)

  • [drc_task_common] Modify threshold of brake: 0.9 -> 0.5
  • [jsk_teleop_joy] Subscribe execute flag and disable update command when execute flag is false
  • [jsk_teleop_joy] Call wait_for_message only once in synchronize
  • [jsk_teleop_joy] synchronizeAllCommand do not takes argument
  • [jsk_teleop_joy] Support single synchroniation
  • [jsk_teleop_joy] Fix neck-p/y joint command range
  • [jsk_teleop_joy] Add initialization service to vehicle joy
  • [jsk_teleop_joy] Add synchronize method to vehicle plugin to prevent overwrite previous command when respown
  • [jsk_teleop_joy] Remove set_current_step_as_max functions because they are moved to vehicle_ui
  • [jsk_teleop_joy] Add neck-p interface to joystick controller for vehicle task
  • [jsk_teleop_joy] Speed down handling command: 0.05->0.025
  • [jsk_teleop_joy] Do not set 0.0 command as max step
  • [jsk_teleop_joy] Add set_current_step_as_max function to vehicle_ui
  • [jsk_teleop_joy] Modify teleop command in joystick controller for vehicle task
  • [jsk_teleop_joy] Rename vehicle.launch to joy_vehicle.launch
  • [jsk_teleop_joy] Add neck_angle_max valiable
  • [jsk_teleop_joy] Add functions for look around to vehicle.launch
  • Add brake command and modify accel command specification
  • Add arguments to determine joystick dev path and namespace for ocs
  • [jsk_teleop_joy] Adjsut command publish rate for vehicle
  • [jsk_teleop_joy] Adjsut handle resolution and modify to publish topic constantly
  • [jsk_teleop_joy] Add joystick program for vehicle
  • remove DEV argument because it was removed from robot_trackball_head.launch

0.1.5 (2015-01-08)

  • [joy_mouse] Use name of kensington mouse and remove dev file specification. [jsk_teleop_joy] Remove DEV argument
  • add script to publish pose stamped with spacenav
  • Fix poping-up cancel window by broadcasting canceled information
  • add api to change successor
  • Add text publishing when checking breakpoint
  • Publish usage of footstep planner joy
  • disable/enable head control with trackball buttons, move head joint continuously.
  • Contributors: Masaki Murooka, Ryohei Ueda, Yusuke Furuta

0.1.4 (2014-10-21)

  • Merge pull request #112 from mmurooka/overwrite-write-command-in-midi-player Overwrite writing command in midi_config_player.py
  • overwrite writing command in midi_config_player.py
  • add pr2_relay.launch
  • publish joy topic only when midi state is changed.
  • add feedback config to b-control.yaml

0.1.3 (2014-10-10)

  • add b_control_status.py
  • add config file of b-control
  • Add joystick interface for jsk_pcl_ros/EnvironmentPlaneModeling
  • use scripts/head_control_by_trackball.py for general robot. implimented launch file for pr2 and hrp2
  • Merge branch 'master' into select-menu-with-analog-stick
  • autorepeat joy input
  • check analog input
  • remap tf
  • test analog check
  • get argument for set pose

0.1.2 (2014-09-08)

0.1.1 (2014-09-04)

  • remap joint states and DEV
  • add script to control head via trackball
  • remove trackpoint_joy.py
  • mvoe python scripts to parse state to src directory
  • fix bag at first time
  • update menu
  • publish at 10hz
  • set autorepeat rate
  • use joy mux
  • make JoyStatus class
  • fix the menu when walking is canceled and update the pose from joy stick according to the snapped pose availble by marker
  • pop menu when cancel the footstep and support resuming from joystick
  • cancel walking via joystick
  • update diagnostics information about footstep planning and joy stick stuff
  • compile euslisp file before running footstep planner
  • circle button to move arm
  • Merge branch 'master' into fix-jsk-interactive-marker-plugin Conflicts: jsk_teleop_joy/launch/pr2.launch
    • remove jsk_interactive_marker.launch and integrate it to pr2.launch
    • rewrite jsk_interactive_marker plugin to modern plugin style
  • add plugin to show usage
  • delete empty lines
  • Merge branch 'master' into add-plugin-for-jsk-interactive-marker Conflicts: jsk_teleop_joy/manifest.xml jsk_teleop_joy/package.xml jsk_teleop_joy/src/jsk_teleop_joy/plugin/joy_pose_6d.py
  • modify launch file
  • jsk_teleop_joy depends on jsk_rviz_plugins
  • update moveit teleop plugin to the latest change of moveit
  • add center button to JoyStatus class and use center button to choose menu
  • add new plugin to relay and convert joy message to ps3
  • add Relay plugin to jsk_teleop_joy
  • use singleton class to maintain view point of rviz to have persistency across several plugins
  • show overlay menu on rviz to swtich plugins
  • support multiple instances per one plugin class
  • use diagnostic_updater package to generate diagnostic messages rather than publish diagnostic_msgs directly
  • optimize rviz animation smoother by joy stick controller
  • support jsk_teleop_joy in robot-controller-sample.launch of jsk_ik_server
  • publish the status of jsk_teleop_joy to /diagnostics. decrease the number of the messages if the joy stick type is failed to be estimated. publish the status of the estimation to /diagnostics
  • make interactive_midi_config available for hydro
  • fix midi_config_player for groovy
  • make midi_config_player available for hydro
  • add button to control interactive marker
  • transform PoseStamped when setting marker pose
  • add method to set pose
  • add method to change move arm
  • use triangle button to send menu
  • fix find -> find_module to detect catkin or rosbuild
  • add config for padcontrol
  • support groovy on all the plugins
  • use imp module to decide use load_manifest or not
  • send 'move' when circle button is pushed
  • add dependancy on jsk_interactive_marker
  • rename plugin scripts to avoid msg import bug
  • add import statement
  • use load_manifest on groovy
  • use load_manifest on groovy
  • add end effector controller interface
  • JoyFootstepPlanner: publish execute if circle button is pushed
  • JoyFootstepPlanner: reset goal pose if cross button is pushed
  • determines the initial position of goal according to the specified frame_id and offset for the legs
  • add tf_ext.py to jsk_teleop_joy. it's a set of utitlity function for tf
  • revert to use depend tag for view_controller_msgs
  • write about select button
  • write about how to implement plugin
  • write about how to export the plugins
  • update docs
  • use upper case for MIDI
  • add list of plugins
  • update docs
  • update docs
  • add link to each script
  • update some docs
  • add document about [midi_write.py]{.title-ref}
  • add movie of interactive configuretion of midi device
  • use english in README.md#interactive_midi_config.py
  • fix style of ordered list
  • #2: automatically detect the game controller type at joy_footstep.launch use type=auto parameter
  • #2: rename xbox.launch and xbox_footstep.launch to joy.launch and joy_footsetp.launch. it support many game controllers now and the name did not match the current state.
  • #2: detect ps3 wireless automatically
  • #2: use auto mode as default
  • #2: update document about ps3 bluetooth
  • mv jsk_joy/ jsk_teleop_joy/
  • rename jsk_joy -> jsk_telop_joy
  • fix to use rosdep
  • adding footstep planning demo plugin
  • updating the parameters
  • arg1 = topic name, arg2 = device name
  • fix topic name
  • install subdirectory into dist_package
  • auto detecting xbox/ps3wired
  • use joy_main as a wrapper of jsk_joy python library
  • not use roslib.load_manifest if the distro is hydro
  • installing launch file and so on
  • catkinized jsk_joy package
  • changed frame from base_link to odom
  • added JoyGoPos for plugin.xml
  • added gopos.py for teleoperation locomotion command
  • added gopos.launch for teleoperation locomotion command
  • sample launch for marker_6dof
  • tuned parameters to move camera
  • adding moveit plugin for controlling moveit from gaming controllers
  • launch file for pr2 moveit
  • adding README
  • adding configuration for launchpad mini
  • adding output configuration to QuNeo
  • supporting output of MIDI
  • adding script to test output of midi devices
  • mapping buttons automatically from axes
  • update midi configuration
  • script to verbose midi input
  • not printing input
  • adding nanokontrol2.yaml
  • updating configuration file
  • supporting 144/128 key event
  • adding config file for icontrols pro
  • adding scripts to configure midi device interactively
  • changing joy footstep planner plugin to use footstep marker in jsk_interactive_marker
  • adding interface to call footstep planning from game controllers
  • adding verbose plugin for debugging and support wired ps3 controller
  • add nanopad2_joy.py, touchpad and scene button supported
  • adding sample to run xbox footstep plugin
  • update orientation way to local
  • supporting local z movement acoording to orientation
  • adding manual footstep generator interface
  • updating parameters of view rotation
  • test pulibhs program for joystick, any joystick ok?
  • supports to toggle follow view mode
  • devided trackpoint joy publisher and status class to two files.
  • added nanopad_joy.py nanopad_status.py for KORG nanoPAD2
  • updating some parameters
  • supporting pitch and roll
  • implementing jsk_joy as plugin system
  • changed class name of nanokontrol status: NanoKONTROL2 -> NanoKONTROL2Status
  • add nanokontrol_status.py. convert data from Joy msg to nanoKONTROL class instance.
  • support touchpad; auto-detect device id
  • light turns on when button is pushed
  • added device link URL of vestax_spin2
  • added trackpoint_joy.py. publish thinkpad trackpoint status as Joy.
  • bugfix button type
  • set vestax_spin2.py execuable
  • chnaged button index of akailpd8. set for PROG1 PAD mode.
  • bugfix indent
  • added URL of device web page for lanchpad
  • add controller for vestax spin 2
  • added akaiLPD8.py
  • added device URL link for nanokontrol
  • add script to publish joy_message with launchpad mini
  • deleted debug outpu in nanokontrol_joy.py
  • add rosdep name=python
  • added nanokontrol_joy.py for publishing nanoKONTROL2 input as Joy.
  • update some parameters
  • update some parameters
  • using left analog to zoom in/out
  • introducing new package: jsk_joy
  • Contributors: Kei Okada, Masaki Murooka, Ryohei Ueda, Satoshi Iwaishi, Yuki Furuta, Yusuke Furuta, Shunichi Nozawa, Shintaro Noda, Youhei Kakiuchi

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Launch files

Messages

No message files found.

Services

No service files found

Plugins

Recent questions tagged jsk_teleop_joy at Robotics Stack Exchange

No version for distro ardent. Known supported distros are highlighted in the buttons above.
No version for distro bouncy. Known supported distros are highlighted in the buttons above.
No version for distro crystal. Known supported distros are highlighted in the buttons above.
No version for distro eloquent. Known supported distros are highlighted in the buttons above.
No version for distro dashing. Known supported distros are highlighted in the buttons above.
No version for distro galactic. Known supported distros are highlighted in the buttons above.
No version for distro foxy. Known supported distros are highlighted in the buttons above.
No version for distro iron. Known supported distros are highlighted in the buttons above.
No version for distro lunar. Known supported distros are highlighted in the buttons above.

Package Summary

Tags No category tags.
Version 0.1.18
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/jsk-ros-pkg/jsk_control.git
VCS Type git
VCS Version master
Last Updated 2024-12-09
Dev Status DEVELOPED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

jsk_teleop_joy

Additional Links

Maintainers

  • Ryohei Ueda

Authors

  • Ryohei Ueda

jsk_teleop_joy package

Introduction

This package provides physical UI for teleoperatoin such as joy sticks, game controllers and MIDI instruments.

Supported game controllers

This package supports following game controllers:

  1. XBox360 controller
  2. PS3 Controller (Bluetooth)
  3. PS3 Controller (USB)

In order to use PS3 controller via Bluetooth, see this instruction.

Architecture of jsk_teleop_joy

jsk_teleop_joy (the main script is joy_main.py) is based on plugin architecture.

ROS packages provides the plugins for jsk_teleop_joy and each plugin represents a function such as “specify 6D pose of the end effector”.

You can enable some plugins and choose which plugin you want to use by “Pushing Select Button”.

jsk_teleop_joy plugins out of box

  • VerboseStatus
  • JoyPose6D
  • JoyFootstep
  • JoyFootstepPlanner
  • JoyFootstepPlannerDemo
  • JoyMoveIt
  • JoyGoPos

How to implement a plugin

  1. write xml file to define plugins.
  2. Export the xml file from your ROS package using manifest.xml or package.xml.
  3. implement plugin

Write xml file to define plugins

jsk_teleop_joy reads the plugin definition from a xml file like plugin.xml.

That xml should be like:

<library>
  <class name="Foo" type="your_package.foo">
  </class>
</library>

The xml file should have <library> tag at the top level. And you can define plugins by <class> tag.

  • name attribute means the name of the plugin. You will choose plugins by this name in your launch files (example).
  • type attribute means the python class of the plugin. jsk_teleop_joy tries to instantiate plugin class using thie type name.

Export the xml file from your ROS package

You need to export that xml file using <export> tag and <jsk_teleop_joy> tag in your manifest.xml or package.xml.

These two files, manifest.xml, package.xml, are good examples.

Implement a plugin

Finally, you can implement a jsk_teleop_joy plugin.

VerboseStatus Plugin is a good example how to implement a plugin.

__init__ method

All the plugins are required to inherits jsk_teleop_joy.joy_plugin.JSKJoyPlugin and call JSKJoyPlugin.__init__ in its __init__ constructor.

class VerboseStatus(jsk_teleop_joy.joy_plugin.JSKJoyPlugin):
  def __init__(self):
    jsk_teleop_joy.joy_plugin.JSKJoyPlugin.__init__(self, 'VerbosePlugin')

joyCB method

Each time jsk_teleop_joy receives /joy message, it calls joyCB method of the active plugin.

  def joyCB(self, status, history):
    rospy.loginfo('analog left (%f, %f)' % (status.left_analog_x, status.left_analog_y))

The 2nd argument of joyCB is an instance of JoyStatus. JoyStatus is one of XboxStatus, PS3Status and PS3WiredStatus. This means the latest message from /joy. These 3 classes provide the same interface and you don’t need to care about which controller the user uses.

On the other hand, the 3rd argument of joyCB (history), is a sequence of JoyStatus. it’s an instance of StatusHistory. It means a hisotry of recent JoyStatus.

SELECT button

jsk_teleop_joy system occupies SELECT button so you cannot use SELECT button in your plugin. SELECT button is used for switching plugins.

MIDI controllers

interactive_midi_config.py

You can configure MIDI devices by this script interactively. movie

  1. Connect you MIDI device.
  2. First, the script asks the name of device, please choose the device you want to use.
  3. Second, please push the buttons/slide the faders in the order you want to get as sensor_msgs/Joy. The script maps those buttons to sensor_msgs/Joy/axes (and sensor_msgs/Joy/buttons if possible).
  4. Please type q to quit. And the configure will be saved into /tmp/midi.yaml.
  • Troubleshooting:

For Ubuntu18.04 and pygame2.0.1 installed by pip, python -c "import pygame.midi; pygame.midi.init()" returns error below;

 ALSA lib conf.c:3558:(snd_config_hooks_call) Cannot open shared library libasound_module_conf_pulse.so (/usr/lib/alsa-lib/libasound_module_conf_pulse.so: libasound_module_conf_pulse.so: cannot open shared object file: No such file or directory)
ALSA lib seq.c:935:(snd_seq_open_noupdate) Unknown SEQ default

In this case, you need to get pygame from apt i.e pip uninstall pygame && apt-get install python-pygame

NOT RECOMMENDED: Or if you really want to keep using pip installed pygame, you can make symbolic link i.e. ln -s /usr/lib/x86_64-linux-gnu/alsa-lib /usr/lib/alsa-lib: BUT WE DO NOT RECOMMED

midi_write.py

In order to control LEDs and active faders, need to output some MIDI commands from you computer. The script midi_write.py helps to dig the command and you can save the configuration to a yaml file by -w option.

midi_config_player.py

This script publishes sensor_msgs/Joy to /joy based on a yaml file configured by interactive_midi_config.py and midi_write.py.

configs directory includes some yaml files for several MIDI devices.

CHANGELOG

Changelog for package jsk_teleop_joy

0.1.18 (2024-12-09)

  • [jsk_teleop_joy] support midi launchpad X (#789)
  • [jsk_teleop_joy] python3-pygame is required on noetic (#787)
  • Contributors: Shun Hasegawa, Yoshiki Obinata

0.1.17 (2023-05-28)

0.1.16 (2022-10-27)

  • fix for python3 (#776)
  • add from __future_ import print_function (#773)
  • [README.md] delete pip instruction and recommend apt version only (#760)
  • fix for python3 (#763)
    • 2to3 -w -fexcept .
    • 2to3 -w -fprint .
    • update readme
    • Update jsk_teleop_joy/README.md
  • Add ipega controller support (#716)
    • Fixed a key setting mistake. Add controller_type ipega as a possible input for joy_status
    • Add ipega controller support
  • Contributors: Shingo Kitagawa, Iki Yo, Kei Okada, Yoichiro Kawamura

0.1.15 (2018-05-16)

  • Merge pull request #693 from k-okada/fix_apt_slow remove unused build_depends
  • remove unused build_depends
  • Contributors: Kei Okada

0.1.14 (2018-01-15)

0.1.13 (2017-04-18)

  • [jsk_footstep_planner, jsk_teleop_joy] add stack mode to footstep_marker
  • [jsk_teleop_joy] Remove / from default frame_id in pose6d plugin
  • [jsk_teleop_joy] update view control in rviz using teleop_joy
  • Contributors: Yohei Kakiuchi

0.1.12 (2017-02-22)

0.1.11 (2017-02-09)

0.1.10 (2016-12-15)

  • [jsk_teleop_joy] package.xml : add pygame run depend (#657)
  • Add toggle footstep marker mode joy interface (#607)
    • src/jsk_teleop_joy/plugin/joy_footstep_marker.py: Add joy interface to toggle planning mode
  • Add plugin to send cmd_vel from joystick contorller (#600)
    • [jsk_teleop_joy] src/jsk_teleop_joy/joy.py : Add plugin_package option to JoyManager to use joy plugins in other packages
    • [jsk_teleop_joy] src/jsk_teleop_joy/plugin/joy_cmd_vel.py : Add orthogonal_axis_mode, which does not allow diagonal movement
    • [jsk_teleop_joy] src/jsk_teleop_joy/plugin/joy_cmd_vel.py : Add plugin to send cmd_vel from joystick contorller
  • Add utility tools for jaxon footstep planner (#598)
    • [jsk_footstep_planner] launch/joy_footstep_marker.launch : Add joy_footstep_marker launch, which control footstep_marker from joystick controller
  • Project odom_init to detected floor (#579)
    • [jsk_teleop_joy] Check result of service call by exception handling
    • [jsk_teleop_joy] Display OverlayMenu before execute footstep
    • [jsk_teleop_joy] sync pre_pose in joy_footstep_marker only at first of the pose update sequence
    • [jsk_teleop_joy] Add marker_name arg to getCurrentMarkerPose and initialize marker by initial_footstep_marker in reset process
    • [jsk_teleop_joy] Add footstep marker synchonization to joy_footstep_marker
    • [jsk_teleop_joy] Add joycontroller interface plugin for footstep_marker
  • Contributors: Kanae Kochigami, Iory Kumagai

0.1.9 (2016-03-23)

0.1.8 (2015-11-02)

0.1.7 (2015-11-01)

  • [jsk_teleop_joy/joy_relative_converter.py] add reset command
  • [jsk_teleop_joy/scripts/joy_relative_converter.py] fix bug to support buttons
  • Revert "[jsk_teleop_joy/scripts/joy_relative_converter.py] fix bug to support buttons" This reverts commit 1704b24d2b96aae962e4c87968f68078442417a2.
  • [jsk_teleop_joy/scripts/joy_relative_converter.py] fix bug to support buttons
  • put most process into class method Conflicts: jsk_teleop_joy/scripts/joy_relative_converter.py
  • instantiate before subscribe Conflicts: jsk_teleop_joy/scripts/joy_relative_converter.py
  • fix bug around page-change
  • implement page-change
  • add joy_relative_converter
  • [jsk_footstep_controller, jsk_teleop_joy] Use footstep-controller.l and lock/unlock furutaractive model during exeucuting footsteps
  • Remove manifest.xml and Makefile and use catkin style filesystem
  • Contributors: Ryohei Ueda, Satoshi Iwaishi

0.1.6 (2015-06-11)

  • [drc_task_common] Modify threshold of brake: 0.9 -> 0.5
  • [jsk_teleop_joy] Subscribe execute flag and disable update command when execute flag is false
  • [jsk_teleop_joy] Call wait_for_message only once in synchronize
  • [jsk_teleop_joy] synchronizeAllCommand do not takes argument
  • [jsk_teleop_joy] Support single synchroniation
  • [jsk_teleop_joy] Fix neck-p/y joint command range
  • [jsk_teleop_joy] Add initialization service to vehicle joy
  • [jsk_teleop_joy] Add synchronize method to vehicle plugin to prevent overwrite previous command when respown
  • [jsk_teleop_joy] Remove set_current_step_as_max functions because they are moved to vehicle_ui
  • [jsk_teleop_joy] Add neck-p interface to joystick controller for vehicle task
  • [jsk_teleop_joy] Speed down handling command: 0.05->0.025
  • [jsk_teleop_joy] Do not set 0.0 command as max step
  • [jsk_teleop_joy] Add set_current_step_as_max function to vehicle_ui
  • [jsk_teleop_joy] Modify teleop command in joystick controller for vehicle task
  • [jsk_teleop_joy] Rename vehicle.launch to joy_vehicle.launch
  • [jsk_teleop_joy] Add neck_angle_max valiable
  • [jsk_teleop_joy] Add functions for look around to vehicle.launch
  • Add brake command and modify accel command specification
  • Add arguments to determine joystick dev path and namespace for ocs
  • [jsk_teleop_joy] Adjsut command publish rate for vehicle
  • [jsk_teleop_joy] Adjsut handle resolution and modify to publish topic constantly
  • [jsk_teleop_joy] Add joystick program for vehicle
  • remove DEV argument because it was removed from robot_trackball_head.launch

0.1.5 (2015-01-08)

  • [joy_mouse] Use name of kensington mouse and remove dev file specification. [jsk_teleop_joy] Remove DEV argument
  • add script to publish pose stamped with spacenav
  • Fix poping-up cancel window by broadcasting canceled information
  • add api to change successor
  • Add text publishing when checking breakpoint
  • Publish usage of footstep planner joy
  • disable/enable head control with trackball buttons, move head joint continuously.
  • Contributors: Masaki Murooka, Ryohei Ueda, Yusuke Furuta

0.1.4 (2014-10-21)

  • Merge pull request #112 from mmurooka/overwrite-write-command-in-midi-player Overwrite writing command in midi_config_player.py
  • overwrite writing command in midi_config_player.py
  • add pr2_relay.launch
  • publish joy topic only when midi state is changed.
  • add feedback config to b-control.yaml

0.1.3 (2014-10-10)

  • add b_control_status.py
  • add config file of b-control
  • Add joystick interface for jsk_pcl_ros/EnvironmentPlaneModeling
  • use scripts/head_control_by_trackball.py for general robot. implimented launch file for pr2 and hrp2
  • Merge branch 'master' into select-menu-with-analog-stick
  • autorepeat joy input
  • check analog input
  • remap tf
  • test analog check
  • get argument for set pose

0.1.2 (2014-09-08)

0.1.1 (2014-09-04)

  • remap joint states and DEV
  • add script to control head via trackball
  • remove trackpoint_joy.py
  • mvoe python scripts to parse state to src directory
  • fix bag at first time
  • update menu
  • publish at 10hz
  • set autorepeat rate
  • use joy mux
  • make JoyStatus class
  • fix the menu when walking is canceled and update the pose from joy stick according to the snapped pose availble by marker
  • pop menu when cancel the footstep and support resuming from joystick
  • cancel walking via joystick
  • update diagnostics information about footstep planning and joy stick stuff
  • compile euslisp file before running footstep planner
  • circle button to move arm
  • Merge branch 'master' into fix-jsk-interactive-marker-plugin Conflicts: jsk_teleop_joy/launch/pr2.launch
    • remove jsk_interactive_marker.launch and integrate it to pr2.launch
    • rewrite jsk_interactive_marker plugin to modern plugin style
  • add plugin to show usage
  • delete empty lines
  • Merge branch 'master' into add-plugin-for-jsk-interactive-marker Conflicts: jsk_teleop_joy/manifest.xml jsk_teleop_joy/package.xml jsk_teleop_joy/src/jsk_teleop_joy/plugin/joy_pose_6d.py
  • modify launch file
  • jsk_teleop_joy depends on jsk_rviz_plugins
  • update moveit teleop plugin to the latest change of moveit
  • add center button to JoyStatus class and use center button to choose menu
  • add new plugin to relay and convert joy message to ps3
  • add Relay plugin to jsk_teleop_joy
  • use singleton class to maintain view point of rviz to have persistency across several plugins
  • show overlay menu on rviz to swtich plugins
  • support multiple instances per one plugin class
  • use diagnostic_updater package to generate diagnostic messages rather than publish diagnostic_msgs directly
  • optimize rviz animation smoother by joy stick controller
  • support jsk_teleop_joy in robot-controller-sample.launch of jsk_ik_server
  • publish the status of jsk_teleop_joy to /diagnostics. decrease the number of the messages if the joy stick type is failed to be estimated. publish the status of the estimation to /diagnostics
  • make interactive_midi_config available for hydro
  • fix midi_config_player for groovy
  • make midi_config_player available for hydro
  • add button to control interactive marker
  • transform PoseStamped when setting marker pose
  • add method to set pose
  • add method to change move arm
  • use triangle button to send menu
  • fix find -> find_module to detect catkin or rosbuild
  • add config for padcontrol
  • support groovy on all the plugins
  • use imp module to decide use load_manifest or not
  • send 'move' when circle button is pushed
  • add dependancy on jsk_interactive_marker
  • rename plugin scripts to avoid msg import bug
  • add import statement
  • use load_manifest on groovy
  • use load_manifest on groovy
  • add end effector controller interface
  • JoyFootstepPlanner: publish execute if circle button is pushed
  • JoyFootstepPlanner: reset goal pose if cross button is pushed
  • determines the initial position of goal according to the specified frame_id and offset for the legs
  • add tf_ext.py to jsk_teleop_joy. it's a set of utitlity function for tf
  • revert to use depend tag for view_controller_msgs
  • write about select button
  • write about how to implement plugin
  • write about how to export the plugins
  • update docs
  • use upper case for MIDI
  • add list of plugins
  • update docs
  • update docs
  • add link to each script
  • update some docs
  • add document about [midi_write.py]{.title-ref}
  • add movie of interactive configuretion of midi device
  • use english in README.md#interactive_midi_config.py
  • fix style of ordered list
  • #2: automatically detect the game controller type at joy_footstep.launch use type=auto parameter
  • #2: rename xbox.launch and xbox_footstep.launch to joy.launch and joy_footsetp.launch. it support many game controllers now and the name did not match the current state.
  • #2: detect ps3 wireless automatically
  • #2: use auto mode as default
  • #2: update document about ps3 bluetooth
  • mv jsk_joy/ jsk_teleop_joy/
  • rename jsk_joy -> jsk_telop_joy
  • fix to use rosdep
  • adding footstep planning demo plugin
  • updating the parameters
  • arg1 = topic name, arg2 = device name
  • fix topic name
  • install subdirectory into dist_package
  • auto detecting xbox/ps3wired
  • use joy_main as a wrapper of jsk_joy python library
  • not use roslib.load_manifest if the distro is hydro
  • installing launch file and so on
  • catkinized jsk_joy package
  • changed frame from base_link to odom
  • added JoyGoPos for plugin.xml
  • added gopos.py for teleoperation locomotion command
  • added gopos.launch for teleoperation locomotion command
  • sample launch for marker_6dof
  • tuned parameters to move camera
  • adding moveit plugin for controlling moveit from gaming controllers
  • launch file for pr2 moveit
  • adding README
  • adding configuration for launchpad mini
  • adding output configuration to QuNeo
  • supporting output of MIDI
  • adding script to test output of midi devices
  • mapping buttons automatically from axes
  • update midi configuration
  • script to verbose midi input
  • not printing input
  • adding nanokontrol2.yaml
  • updating configuration file
  • supporting 144/128 key event
  • adding config file for icontrols pro
  • adding scripts to configure midi device interactively
  • changing joy footstep planner plugin to use footstep marker in jsk_interactive_marker
  • adding interface to call footstep planning from game controllers
  • adding verbose plugin for debugging and support wired ps3 controller
  • add nanopad2_joy.py, touchpad and scene button supported
  • adding sample to run xbox footstep plugin
  • update orientation way to local
  • supporting local z movement acoording to orientation
  • adding manual footstep generator interface
  • updating parameters of view rotation
  • test pulibhs program for joystick, any joystick ok?
  • supports to toggle follow view mode
  • devided trackpoint joy publisher and status class to two files.
  • added nanopad_joy.py nanopad_status.py for KORG nanoPAD2
  • updating some parameters
  • supporting pitch and roll
  • implementing jsk_joy as plugin system
  • changed class name of nanokontrol status: NanoKONTROL2 -> NanoKONTROL2Status
  • add nanokontrol_status.py. convert data from Joy msg to nanoKONTROL class instance.
  • support touchpad; auto-detect device id
  • light turns on when button is pushed
  • added device link URL of vestax_spin2
  • added trackpoint_joy.py. publish thinkpad trackpoint status as Joy.
  • bugfix button type
  • set vestax_spin2.py execuable
  • chnaged button index of akailpd8. set for PROG1 PAD mode.
  • bugfix indent
  • added URL of device web page for lanchpad
  • add controller for vestax spin 2
  • added akaiLPD8.py
  • added device URL link for nanokontrol
  • add script to publish joy_message with launchpad mini
  • deleted debug outpu in nanokontrol_joy.py
  • add rosdep name=python
  • added nanokontrol_joy.py for publishing nanoKONTROL2 input as Joy.
  • update some parameters
  • update some parameters
  • using left analog to zoom in/out
  • introducing new package: jsk_joy
  • Contributors: Kei Okada, Masaki Murooka, Ryohei Ueda, Satoshi Iwaishi, Yuki Furuta, Yusuke Furuta, Shunichi Nozawa, Shintaro Noda, Youhei Kakiuchi

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Launch files

Messages

No message files found.

Services

No service files found

Plugins

Recent questions tagged jsk_teleop_joy at Robotics Stack Exchange

Package Summary

Tags No category tags.
Version 0.1.18
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/jsk-ros-pkg/jsk_control.git
VCS Type git
VCS Version master
Last Updated 2024-12-09
Dev Status DEVELOPED
CI status Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

jsk_teleop_joy

Additional Links

Maintainers

  • Ryohei Ueda

Authors

  • Ryohei Ueda

jsk_teleop_joy package

Introduction

This package provides physical UI for teleoperatoin such as joy sticks, game controllers and MIDI instruments.

Supported game controllers

This package supports following game controllers:

  1. XBox360 controller
  2. PS3 Controller (Bluetooth)
  3. PS3 Controller (USB)

In order to use PS3 controller via Bluetooth, see this instruction.

Architecture of jsk_teleop_joy

jsk_teleop_joy (the main script is joy_main.py) is based on plugin architecture.

ROS packages provides the plugins for jsk_teleop_joy and each plugin represents a function such as “specify 6D pose of the end effector”.

You can enable some plugins and choose which plugin you want to use by “Pushing Select Button”.

jsk_teleop_joy plugins out of box

  • VerboseStatus
  • JoyPose6D
  • JoyFootstep
  • JoyFootstepPlanner
  • JoyFootstepPlannerDemo
  • JoyMoveIt
  • JoyGoPos

How to implement a plugin

  1. write xml file to define plugins.
  2. Export the xml file from your ROS package using manifest.xml or package.xml.
  3. implement plugin

Write xml file to define plugins

jsk_teleop_joy reads the plugin definition from a xml file like plugin.xml.

That xml should be like:

<library>
  <class name="Foo" type="your_package.foo">
  </class>
</library>

The xml file should have <library> tag at the top level. And you can define plugins by <class> tag.

  • name attribute means the name of the plugin. You will choose plugins by this name in your launch files (example).
  • type attribute means the python class of the plugin. jsk_teleop_joy tries to instantiate plugin class using thie type name.

Export the xml file from your ROS package

You need to export that xml file using <export> tag and <jsk_teleop_joy> tag in your manifest.xml or package.xml.

These two files, manifest.xml, package.xml, are good examples.

Implement a plugin

Finally, you can implement a jsk_teleop_joy plugin.

VerboseStatus Plugin is a good example how to implement a plugin.

__init__ method

All the plugins are required to inherits jsk_teleop_joy.joy_plugin.JSKJoyPlugin and call JSKJoyPlugin.__init__ in its __init__ constructor.

class VerboseStatus(jsk_teleop_joy.joy_plugin.JSKJoyPlugin):
  def __init__(self):
    jsk_teleop_joy.joy_plugin.JSKJoyPlugin.__init__(self, 'VerbosePlugin')

joyCB method

Each time jsk_teleop_joy receives /joy message, it calls joyCB method of the active plugin.

  def joyCB(self, status, history):
    rospy.loginfo('analog left (%f, %f)' % (status.left_analog_x, status.left_analog_y))

The 2nd argument of joyCB is an instance of JoyStatus. JoyStatus is one of XboxStatus, PS3Status and PS3WiredStatus. This means the latest message from /joy. These 3 classes provide the same interface and you don’t need to care about which controller the user uses.

On the other hand, the 3rd argument of joyCB (history), is a sequence of JoyStatus. it’s an instance of StatusHistory. It means a hisotry of recent JoyStatus.

SELECT button

jsk_teleop_joy system occupies SELECT button so you cannot use SELECT button in your plugin. SELECT button is used for switching plugins.

MIDI controllers

interactive_midi_config.py

You can configure MIDI devices by this script interactively. movie

  1. Connect you MIDI device.
  2. First, the script asks the name of device, please choose the device you want to use.
  3. Second, please push the buttons/slide the faders in the order you want to get as sensor_msgs/Joy. The script maps those buttons to sensor_msgs/Joy/axes (and sensor_msgs/Joy/buttons if possible).
  4. Please type q to quit. And the configure will be saved into /tmp/midi.yaml.
  • Troubleshooting:

For Ubuntu18.04 and pygame2.0.1 installed by pip, python -c "import pygame.midi; pygame.midi.init()" returns error below;

 ALSA lib conf.c:3558:(snd_config_hooks_call) Cannot open shared library libasound_module_conf_pulse.so (/usr/lib/alsa-lib/libasound_module_conf_pulse.so: libasound_module_conf_pulse.so: cannot open shared object file: No such file or directory)
ALSA lib seq.c:935:(snd_seq_open_noupdate) Unknown SEQ default

In this case, you need to get pygame from apt i.e pip uninstall pygame && apt-get install python-pygame

NOT RECOMMENDED: Or if you really want to keep using pip installed pygame, you can make symbolic link i.e. ln -s /usr/lib/x86_64-linux-gnu/alsa-lib /usr/lib/alsa-lib: BUT WE DO NOT RECOMMED

midi_write.py

In order to control LEDs and active faders, need to output some MIDI commands from you computer. The script midi_write.py helps to dig the command and you can save the configuration to a yaml file by -w option.

midi_config_player.py

This script publishes sensor_msgs/Joy to /joy based on a yaml file configured by interactive_midi_config.py and midi_write.py.

configs directory includes some yaml files for several MIDI devices.

CHANGELOG

Changelog for package jsk_teleop_joy

0.1.18 (2024-12-09)

  • [jsk_teleop_joy] support midi launchpad X (#789)
  • [jsk_teleop_joy] python3-pygame is required on noetic (#787)
  • Contributors: Shun Hasegawa, Yoshiki Obinata

0.1.17 (2023-05-28)

0.1.16 (2022-10-27)

  • fix for python3 (#776)
  • add from __future_ import print_function (#773)
  • [README.md] delete pip instruction and recommend apt version only (#760)
  • fix for python3 (#763)
    • 2to3 -w -fexcept .
    • 2to3 -w -fprint .
    • update readme
    • Update jsk_teleop_joy/README.md
  • Add ipega controller support (#716)
    • Fixed a key setting mistake. Add controller_type ipega as a possible input for joy_status
    • Add ipega controller support
  • Contributors: Shingo Kitagawa, Iki Yo, Kei Okada, Yoichiro Kawamura

0.1.15 (2018-05-16)

  • Merge pull request #693 from k-okada/fix_apt_slow remove unused build_depends
  • remove unused build_depends
  • Contributors: Kei Okada

0.1.14 (2018-01-15)

0.1.13 (2017-04-18)

  • [jsk_footstep_planner, jsk_teleop_joy] add stack mode to footstep_marker
  • [jsk_teleop_joy] Remove / from default frame_id in pose6d plugin
  • [jsk_teleop_joy] update view control in rviz using teleop_joy
  • Contributors: Yohei Kakiuchi

0.1.12 (2017-02-22)

0.1.11 (2017-02-09)

0.1.10 (2016-12-15)

  • [jsk_teleop_joy] package.xml : add pygame run depend (#657)
  • Add toggle footstep marker mode joy interface (#607)
    • src/jsk_teleop_joy/plugin/joy_footstep_marker.py: Add joy interface to toggle planning mode
  • Add plugin to send cmd_vel from joystick contorller (#600)
    • [jsk_teleop_joy] src/jsk_teleop_joy/joy.py : Add plugin_package option to JoyManager to use joy plugins in other packages
    • [jsk_teleop_joy] src/jsk_teleop_joy/plugin/joy_cmd_vel.py : Add orthogonal_axis_mode, which does not allow diagonal movement
    • [jsk_teleop_joy] src/jsk_teleop_joy/plugin/joy_cmd_vel.py : Add plugin to send cmd_vel from joystick contorller
  • Add utility tools for jaxon footstep planner (#598)
    • [jsk_footstep_planner] launch/joy_footstep_marker.launch : Add joy_footstep_marker launch, which control footstep_marker from joystick controller
  • Project odom_init to detected floor (#579)
    • [jsk_teleop_joy] Check result of service call by exception handling
    • [jsk_teleop_joy] Display OverlayMenu before execute footstep
    • [jsk_teleop_joy] sync pre_pose in joy_footstep_marker only at first of the pose update sequence
    • [jsk_teleop_joy] Add marker_name arg to getCurrentMarkerPose and initialize marker by initial_footstep_marker in reset process
    • [jsk_teleop_joy] Add footstep marker synchonization to joy_footstep_marker
    • [jsk_teleop_joy] Add joycontroller interface plugin for footstep_marker
  • Contributors: Kanae Kochigami, Iory Kumagai

0.1.9 (2016-03-23)

0.1.8 (2015-11-02)

0.1.7 (2015-11-01)

  • [jsk_teleop_joy/joy_relative_converter.py] add reset command
  • [jsk_teleop_joy/scripts/joy_relative_converter.py] fix bug to support buttons
  • Revert "[jsk_teleop_joy/scripts/joy_relative_converter.py] fix bug to support buttons" This reverts commit 1704b24d2b96aae962e4c87968f68078442417a2.
  • [jsk_teleop_joy/scripts/joy_relative_converter.py] fix bug to support buttons
  • put most process into class method Conflicts: jsk_teleop_joy/scripts/joy_relative_converter.py
  • instantiate before subscribe Conflicts: jsk_teleop_joy/scripts/joy_relative_converter.py
  • fix bug around page-change
  • implement page-change
  • add joy_relative_converter
  • [jsk_footstep_controller, jsk_teleop_joy] Use footstep-controller.l and lock/unlock furutaractive model during exeucuting footsteps
  • Remove manifest.xml and Makefile and use catkin style filesystem
  • Contributors: Ryohei Ueda, Satoshi Iwaishi

0.1.6 (2015-06-11)

  • [drc_task_common] Modify threshold of brake: 0.9 -> 0.5
  • [jsk_teleop_joy] Subscribe execute flag and disable update command when execute flag is false
  • [jsk_teleop_joy] Call wait_for_message only once in synchronize
  • [jsk_teleop_joy] synchronizeAllCommand do not takes argument
  • [jsk_teleop_joy] Support single synchroniation
  • [jsk_teleop_joy] Fix neck-p/y joint command range
  • [jsk_teleop_joy] Add initialization service to vehicle joy
  • [jsk_teleop_joy] Add synchronize method to vehicle plugin to prevent overwrite previous command when respown
  • [jsk_teleop_joy] Remove set_current_step_as_max functions because they are moved to vehicle_ui
  • [jsk_teleop_joy] Add neck-p interface to joystick controller for vehicle task
  • [jsk_teleop_joy] Speed down handling command: 0.05->0.025
  • [jsk_teleop_joy] Do not set 0.0 command as max step
  • [jsk_teleop_joy] Add set_current_step_as_max function to vehicle_ui
  • [jsk_teleop_joy] Modify teleop command in joystick controller for vehicle task
  • [jsk_teleop_joy] Rename vehicle.launch to joy_vehicle.launch
  • [jsk_teleop_joy] Add neck_angle_max valiable
  • [jsk_teleop_joy] Add functions for look around to vehicle.launch
  • Add brake command and modify accel command specification
  • Add arguments to determine joystick dev path and namespace for ocs
  • [jsk_teleop_joy] Adjsut command publish rate for vehicle
  • [jsk_teleop_joy] Adjsut handle resolution and modify to publish topic constantly
  • [jsk_teleop_joy] Add joystick program for vehicle
  • remove DEV argument because it was removed from robot_trackball_head.launch

0.1.5 (2015-01-08)

  • [joy_mouse] Use name of kensington mouse and remove dev file specification. [jsk_teleop_joy] Remove DEV argument
  • add script to publish pose stamped with spacenav
  • Fix poping-up cancel window by broadcasting canceled information
  • add api to change successor
  • Add text publishing when checking breakpoint
  • Publish usage of footstep planner joy
  • disable/enable head control with trackball buttons, move head joint continuously.
  • Contributors: Masaki Murooka, Ryohei Ueda, Yusuke Furuta

0.1.4 (2014-10-21)

  • Merge pull request #112 from mmurooka/overwrite-write-command-in-midi-player Overwrite writing command in midi_config_player.py
  • overwrite writing command in midi_config_player.py
  • add pr2_relay.launch
  • publish joy topic only when midi state is changed.
  • add feedback config to b-control.yaml

0.1.3 (2014-10-10)

  • add b_control_status.py
  • add config file of b-control
  • Add joystick interface for jsk_pcl_ros/EnvironmentPlaneModeling
  • use scripts/head_control_by_trackball.py for general robot. implimented launch file for pr2 and hrp2
  • Merge branch 'master' into select-menu-with-analog-stick
  • autorepeat joy input
  • check analog input
  • remap tf
  • test analog check
  • get argument for set pose

0.1.2 (2014-09-08)

0.1.1 (2014-09-04)

  • remap joint states and DEV
  • add script to control head via trackball
  • remove trackpoint_joy.py
  • mvoe python scripts to parse state to src directory
  • fix bag at first time
  • update menu
  • publish at 10hz
  • set autorepeat rate
  • use joy mux
  • make JoyStatus class
  • fix the menu when walking is canceled and update the pose from joy stick according to the snapped pose availble by marker
  • pop menu when cancel the footstep and support resuming from joystick
  • cancel walking via joystick
  • update diagnostics information about footstep planning and joy stick stuff
  • compile euslisp file before running footstep planner
  • circle button to move arm
  • Merge branch 'master' into fix-jsk-interactive-marker-plugin Conflicts: jsk_teleop_joy/launch/pr2.launch
    • remove jsk_interactive_marker.launch and integrate it to pr2.launch
    • rewrite jsk_interactive_marker plugin to modern plugin style
  • add plugin to show usage
  • delete empty lines
  • Merge branch 'master' into add-plugin-for-jsk-interactive-marker Conflicts: jsk_teleop_joy/manifest.xml jsk_teleop_joy/package.xml jsk_teleop_joy/src/jsk_teleop_joy/plugin/joy_pose_6d.py
  • modify launch file
  • jsk_teleop_joy depends on jsk_rviz_plugins
  • update moveit teleop plugin to the latest change of moveit
  • add center button to JoyStatus class and use center button to choose menu
  • add new plugin to relay and convert joy message to ps3
  • add Relay plugin to jsk_teleop_joy
  • use singleton class to maintain view point of rviz to have persistency across several plugins
  • show overlay menu on rviz to swtich plugins
  • support multiple instances per one plugin class
  • use diagnostic_updater package to generate diagnostic messages rather than publish diagnostic_msgs directly
  • optimize rviz animation smoother by joy stick controller
  • support jsk_teleop_joy in robot-controller-sample.launch of jsk_ik_server
  • publish the status of jsk_teleop_joy to /diagnostics. decrease the number of the messages if the joy stick type is failed to be estimated. publish the status of the estimation to /diagnostics
  • make interactive_midi_config available for hydro
  • fix midi_config_player for groovy
  • make midi_config_player available for hydro
  • add button to control interactive marker
  • transform PoseStamped when setting marker pose
  • add method to set pose
  • add method to change move arm
  • use triangle button to send menu
  • fix find -> find_module to detect catkin or rosbuild
  • add config for padcontrol
  • support groovy on all the plugins
  • use imp module to decide use load_manifest or not
  • send 'move' when circle button is pushed
  • add dependancy on jsk_interactive_marker
  • rename plugin scripts to avoid msg import bug
  • add import statement
  • use load_manifest on groovy
  • use load_manifest on groovy
  • add end effector controller interface
  • JoyFootstepPlanner: publish execute if circle button is pushed
  • JoyFootstepPlanner: reset goal pose if cross button is pushed
  • determines the initial position of goal according to the specified frame_id and offset for the legs
  • add tf_ext.py to jsk_teleop_joy. it's a set of utitlity function for tf
  • revert to use depend tag for view_controller_msgs
  • write about select button
  • write about how to implement plugin
  • write about how to export the plugins
  • update docs
  • use upper case for MIDI
  • add list of plugins
  • update docs
  • update docs
  • add link to each script
  • update some docs
  • add document about [midi_write.py]{.title-ref}
  • add movie of interactive configuretion of midi device
  • use english in README.md#interactive_midi_config.py
  • fix style of ordered list
  • #2: automatically detect the game controller type at joy_footstep.launch use type=auto parameter
  • #2: rename xbox.launch and xbox_footstep.launch to joy.launch and joy_footsetp.launch. it support many game controllers now and the name did not match the current state.
  • #2: detect ps3 wireless automatically
  • #2: use auto mode as default
  • #2: update document about ps3 bluetooth
  • mv jsk_joy/ jsk_teleop_joy/
  • rename jsk_joy -> jsk_telop_joy
  • fix to use rosdep
  • adding footstep planning demo plugin
  • updating the parameters
  • arg1 = topic name, arg2 = device name
  • fix topic name
  • install subdirectory into dist_package
  • auto detecting xbox/ps3wired
  • use joy_main as a wrapper of jsk_joy python library
  • not use roslib.load_manifest if the distro is hydro
  • installing launch file and so on
  • catkinized jsk_joy package
  • changed frame from base_link to odom
  • added JoyGoPos for plugin.xml
  • added gopos.py for teleoperation locomotion command
  • added gopos.launch for teleoperation locomotion command
  • sample launch for marker_6dof
  • tuned parameters to move camera
  • adding moveit plugin for controlling moveit from gaming controllers
  • launch file for pr2 moveit
  • adding README
  • adding configuration for launchpad mini
  • adding output configuration to QuNeo
  • supporting output of MIDI
  • adding script to test output of midi devices
  • mapping buttons automatically from axes
  • update midi configuration
  • script to verbose midi input
  • not printing input
  • adding nanokontrol2.yaml
  • updating configuration file
  • supporting 144/128 key event
  • adding config file for icontrols pro
  • adding scripts to configure midi device interactively
  • changing joy footstep planner plugin to use footstep marker in jsk_interactive_marker
  • adding interface to call footstep planning from game controllers
  • adding verbose plugin for debugging and support wired ps3 controller
  • add nanopad2_joy.py, touchpad and scene button supported
  • adding sample to run xbox footstep plugin
  • update orientation way to local
  • supporting local z movement acoording to orientation
  • adding manual footstep generator interface
  • updating parameters of view rotation
  • test pulibhs program for joystick, any joystick ok?
  • supports to toggle follow view mode
  • devided trackpoint joy publisher and status class to two files.
  • added nanopad_joy.py nanopad_status.py for KORG nanoPAD2
  • updating some parameters
  • supporting pitch and roll
  • implementing jsk_joy as plugin system
  • changed class name of nanokontrol status: NanoKONTROL2 -> NanoKONTROL2Status
  • add nanokontrol_status.py. convert data from Joy msg to nanoKONTROL class instance.
  • support touchpad; auto-detect device id
  • light turns on when button is pushed
  • added device link URL of vestax_spin2
  • added trackpoint_joy.py. publish thinkpad trackpoint status as Joy.
  • bugfix button type
  • set vestax_spin2.py execuable
  • chnaged button index of akailpd8. set for PROG1 PAD mode.
  • bugfix indent
  • added URL of device web page for lanchpad
  • add controller for vestax spin 2
  • added akaiLPD8.py
  • added device URL link for nanokontrol
  • add script to publish joy_message with launchpad mini
  • deleted debug outpu in nanokontrol_joy.py
  • add rosdep name=python
  • added nanokontrol_joy.py for publishing nanoKONTROL2 input as Joy.
  • update some parameters
  • update some parameters
  • using left analog to zoom in/out
  • introducing new package: jsk_joy
  • Contributors: Kei Okada, Masaki Murooka, Ryohei Ueda, Satoshi Iwaishi, Yuki Furuta, Yusuke Furuta, Shunichi Nozawa, Shintaro Noda, Youhei Kakiuchi

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Launch files

Messages

No message files found.

Services

No service files found

Plugins

Recent questions tagged jsk_teleop_joy at Robotics Stack Exchange

Package Summary

Tags No category tags.
Version 0.1.18
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/jsk-ros-pkg/jsk_control.git
VCS Type git
VCS Version master
Last Updated 2024-12-09
Dev Status DEVELOPED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

jsk_teleop_joy

Additional Links

Maintainers

  • Ryohei Ueda

Authors

  • Ryohei Ueda

jsk_teleop_joy package

Introduction

This package provides physical UI for teleoperatoin such as joy sticks, game controllers and MIDI instruments.

Supported game controllers

This package supports following game controllers:

  1. XBox360 controller
  2. PS3 Controller (Bluetooth)
  3. PS3 Controller (USB)

In order to use PS3 controller via Bluetooth, see this instruction.

Architecture of jsk_teleop_joy

jsk_teleop_joy (the main script is joy_main.py) is based on plugin architecture.

ROS packages provides the plugins for jsk_teleop_joy and each plugin represents a function such as “specify 6D pose of the end effector”.

You can enable some plugins and choose which plugin you want to use by “Pushing Select Button”.

jsk_teleop_joy plugins out of box

  • VerboseStatus
  • JoyPose6D
  • JoyFootstep
  • JoyFootstepPlanner
  • JoyFootstepPlannerDemo
  • JoyMoveIt
  • JoyGoPos

How to implement a plugin

  1. write xml file to define plugins.
  2. Export the xml file from your ROS package using manifest.xml or package.xml.
  3. implement plugin

Write xml file to define plugins

jsk_teleop_joy reads the plugin definition from a xml file like plugin.xml.

That xml should be like:

<library>
  <class name="Foo" type="your_package.foo">
  </class>
</library>

The xml file should have <library> tag at the top level. And you can define plugins by <class> tag.

  • name attribute means the name of the plugin. You will choose plugins by this name in your launch files (example).
  • type attribute means the python class of the plugin. jsk_teleop_joy tries to instantiate plugin class using thie type name.

Export the xml file from your ROS package

You need to export that xml file using <export> tag and <jsk_teleop_joy> tag in your manifest.xml or package.xml.

These two files, manifest.xml, package.xml, are good examples.

Implement a plugin

Finally, you can implement a jsk_teleop_joy plugin.

VerboseStatus Plugin is a good example how to implement a plugin.

__init__ method

All the plugins are required to inherits jsk_teleop_joy.joy_plugin.JSKJoyPlugin and call JSKJoyPlugin.__init__ in its __init__ constructor.

class VerboseStatus(jsk_teleop_joy.joy_plugin.JSKJoyPlugin):
  def __init__(self):
    jsk_teleop_joy.joy_plugin.JSKJoyPlugin.__init__(self, 'VerbosePlugin')

joyCB method

Each time jsk_teleop_joy receives /joy message, it calls joyCB method of the active plugin.

  def joyCB(self, status, history):
    rospy.loginfo('analog left (%f, %f)' % (status.left_analog_x, status.left_analog_y))

The 2nd argument of joyCB is an instance of JoyStatus. JoyStatus is one of XboxStatus, PS3Status and PS3WiredStatus. This means the latest message from /joy. These 3 classes provide the same interface and you don’t need to care about which controller the user uses.

On the other hand, the 3rd argument of joyCB (history), is a sequence of JoyStatus. it’s an instance of StatusHistory. It means a hisotry of recent JoyStatus.

SELECT button

jsk_teleop_joy system occupies SELECT button so you cannot use SELECT button in your plugin. SELECT button is used for switching plugins.

MIDI controllers

interactive_midi_config.py

You can configure MIDI devices by this script interactively. movie

  1. Connect you MIDI device.
  2. First, the script asks the name of device, please choose the device you want to use.
  3. Second, please push the buttons/slide the faders in the order you want to get as sensor_msgs/Joy. The script maps those buttons to sensor_msgs/Joy/axes (and sensor_msgs/Joy/buttons if possible).
  4. Please type q to quit. And the configure will be saved into /tmp/midi.yaml.
  • Troubleshooting:

For Ubuntu18.04 and pygame2.0.1 installed by pip, python -c "import pygame.midi; pygame.midi.init()" returns error below;

 ALSA lib conf.c:3558:(snd_config_hooks_call) Cannot open shared library libasound_module_conf_pulse.so (/usr/lib/alsa-lib/libasound_module_conf_pulse.so: libasound_module_conf_pulse.so: cannot open shared object file: No such file or directory)
ALSA lib seq.c:935:(snd_seq_open_noupdate) Unknown SEQ default

In this case, you need to get pygame from apt i.e pip uninstall pygame && apt-get install python-pygame

NOT RECOMMENDED: Or if you really want to keep using pip installed pygame, you can make symbolic link i.e. ln -s /usr/lib/x86_64-linux-gnu/alsa-lib /usr/lib/alsa-lib: BUT WE DO NOT RECOMMED

midi_write.py

In order to control LEDs and active faders, need to output some MIDI commands from you computer. The script midi_write.py helps to dig the command and you can save the configuration to a yaml file by -w option.

midi_config_player.py

This script publishes sensor_msgs/Joy to /joy based on a yaml file configured by interactive_midi_config.py and midi_write.py.

configs directory includes some yaml files for several MIDI devices.

CHANGELOG

Changelog for package jsk_teleop_joy

0.1.18 (2024-12-09)

  • [jsk_teleop_joy] support midi launchpad X (#789)
  • [jsk_teleop_joy] python3-pygame is required on noetic (#787)
  • Contributors: Shun Hasegawa, Yoshiki Obinata

0.1.17 (2023-05-28)

0.1.16 (2022-10-27)

  • fix for python3 (#776)
  • add from __future_ import print_function (#773)
  • [README.md] delete pip instruction and recommend apt version only (#760)
  • fix for python3 (#763)
    • 2to3 -w -fexcept .
    • 2to3 -w -fprint .
    • update readme
    • Update jsk_teleop_joy/README.md
  • Add ipega controller support (#716)
    • Fixed a key setting mistake. Add controller_type ipega as a possible input for joy_status
    • Add ipega controller support
  • Contributors: Shingo Kitagawa, Iki Yo, Kei Okada, Yoichiro Kawamura

0.1.15 (2018-05-16)

  • Merge pull request #693 from k-okada/fix_apt_slow remove unused build_depends
  • remove unused build_depends
  • Contributors: Kei Okada

0.1.14 (2018-01-15)

0.1.13 (2017-04-18)

  • [jsk_footstep_planner, jsk_teleop_joy] add stack mode to footstep_marker
  • [jsk_teleop_joy] Remove / from default frame_id in pose6d plugin
  • [jsk_teleop_joy] update view control in rviz using teleop_joy
  • Contributors: Yohei Kakiuchi

0.1.12 (2017-02-22)

0.1.11 (2017-02-09)

0.1.10 (2016-12-15)

  • [jsk_teleop_joy] package.xml : add pygame run depend (#657)
  • Add toggle footstep marker mode joy interface (#607)
    • src/jsk_teleop_joy/plugin/joy_footstep_marker.py: Add joy interface to toggle planning mode
  • Add plugin to send cmd_vel from joystick contorller (#600)
    • [jsk_teleop_joy] src/jsk_teleop_joy/joy.py : Add plugin_package option to JoyManager to use joy plugins in other packages
    • [jsk_teleop_joy] src/jsk_teleop_joy/plugin/joy_cmd_vel.py : Add orthogonal_axis_mode, which does not allow diagonal movement
    • [jsk_teleop_joy] src/jsk_teleop_joy/plugin/joy_cmd_vel.py : Add plugin to send cmd_vel from joystick contorller
  • Add utility tools for jaxon footstep planner (#598)
    • [jsk_footstep_planner] launch/joy_footstep_marker.launch : Add joy_footstep_marker launch, which control footstep_marker from joystick controller
  • Project odom_init to detected floor (#579)
    • [jsk_teleop_joy] Check result of service call by exception handling
    • [jsk_teleop_joy] Display OverlayMenu before execute footstep
    • [jsk_teleop_joy] sync pre_pose in joy_footstep_marker only at first of the pose update sequence
    • [jsk_teleop_joy] Add marker_name arg to getCurrentMarkerPose and initialize marker by initial_footstep_marker in reset process
    • [jsk_teleop_joy] Add footstep marker synchonization to joy_footstep_marker
    • [jsk_teleop_joy] Add joycontroller interface plugin for footstep_marker
  • Contributors: Kanae Kochigami, Iory Kumagai

0.1.9 (2016-03-23)

0.1.8 (2015-11-02)

0.1.7 (2015-11-01)

  • [jsk_teleop_joy/joy_relative_converter.py] add reset command
  • [jsk_teleop_joy/scripts/joy_relative_converter.py] fix bug to support buttons
  • Revert "[jsk_teleop_joy/scripts/joy_relative_converter.py] fix bug to support buttons" This reverts commit 1704b24d2b96aae962e4c87968f68078442417a2.
  • [jsk_teleop_joy/scripts/joy_relative_converter.py] fix bug to support buttons
  • put most process into class method Conflicts: jsk_teleop_joy/scripts/joy_relative_converter.py
  • instantiate before subscribe Conflicts: jsk_teleop_joy/scripts/joy_relative_converter.py
  • fix bug around page-change
  • implement page-change
  • add joy_relative_converter
  • [jsk_footstep_controller, jsk_teleop_joy] Use footstep-controller.l and lock/unlock furutaractive model during exeucuting footsteps
  • Remove manifest.xml and Makefile and use catkin style filesystem
  • Contributors: Ryohei Ueda, Satoshi Iwaishi

0.1.6 (2015-06-11)

  • [drc_task_common] Modify threshold of brake: 0.9 -> 0.5
  • [jsk_teleop_joy] Subscribe execute flag and disable update command when execute flag is false
  • [jsk_teleop_joy] Call wait_for_message only once in synchronize
  • [jsk_teleop_joy] synchronizeAllCommand do not takes argument
  • [jsk_teleop_joy] Support single synchroniation
  • [jsk_teleop_joy] Fix neck-p/y joint command range
  • [jsk_teleop_joy] Add initialization service to vehicle joy
  • [jsk_teleop_joy] Add synchronize method to vehicle plugin to prevent overwrite previous command when respown
  • [jsk_teleop_joy] Remove set_current_step_as_max functions because they are moved to vehicle_ui
  • [jsk_teleop_joy] Add neck-p interface to joystick controller for vehicle task
  • [jsk_teleop_joy] Speed down handling command: 0.05->0.025
  • [jsk_teleop_joy] Do not set 0.0 command as max step
  • [jsk_teleop_joy] Add set_current_step_as_max function to vehicle_ui
  • [jsk_teleop_joy] Modify teleop command in joystick controller for vehicle task
  • [jsk_teleop_joy] Rename vehicle.launch to joy_vehicle.launch
  • [jsk_teleop_joy] Add neck_angle_max valiable
  • [jsk_teleop_joy] Add functions for look around to vehicle.launch
  • Add brake command and modify accel command specification
  • Add arguments to determine joystick dev path and namespace for ocs
  • [jsk_teleop_joy] Adjsut command publish rate for vehicle
  • [jsk_teleop_joy] Adjsut handle resolution and modify to publish topic constantly
  • [jsk_teleop_joy] Add joystick program for vehicle
  • remove DEV argument because it was removed from robot_trackball_head.launch

0.1.5 (2015-01-08)

  • [joy_mouse] Use name of kensington mouse and remove dev file specification. [jsk_teleop_joy] Remove DEV argument
  • add script to publish pose stamped with spacenav
  • Fix poping-up cancel window by broadcasting canceled information
  • add api to change successor
  • Add text publishing when checking breakpoint
  • Publish usage of footstep planner joy
  • disable/enable head control with trackball buttons, move head joint continuously.
  • Contributors: Masaki Murooka, Ryohei Ueda, Yusuke Furuta

0.1.4 (2014-10-21)

  • Merge pull request #112 from mmurooka/overwrite-write-command-in-midi-player Overwrite writing command in midi_config_player.py
  • overwrite writing command in midi_config_player.py
  • add pr2_relay.launch
  • publish joy topic only when midi state is changed.
  • add feedback config to b-control.yaml

0.1.3 (2014-10-10)

  • add b_control_status.py
  • add config file of b-control
  • Add joystick interface for jsk_pcl_ros/EnvironmentPlaneModeling
  • use scripts/head_control_by_trackball.py for general robot. implimented launch file for pr2 and hrp2
  • Merge branch 'master' into select-menu-with-analog-stick
  • autorepeat joy input
  • check analog input
  • remap tf
  • test analog check
  • get argument for set pose

0.1.2 (2014-09-08)

0.1.1 (2014-09-04)

  • remap joint states and DEV
  • add script to control head via trackball
  • remove trackpoint_joy.py
  • mvoe python scripts to parse state to src directory
  • fix bag at first time
  • update menu
  • publish at 10hz
  • set autorepeat rate
  • use joy mux
  • make JoyStatus class
  • fix the menu when walking is canceled and update the pose from joy stick according to the snapped pose availble by marker
  • pop menu when cancel the footstep and support resuming from joystick
  • cancel walking via joystick
  • update diagnostics information about footstep planning and joy stick stuff
  • compile euslisp file before running footstep planner
  • circle button to move arm
  • Merge branch 'master' into fix-jsk-interactive-marker-plugin Conflicts: jsk_teleop_joy/launch/pr2.launch
    • remove jsk_interactive_marker.launch and integrate it to pr2.launch
    • rewrite jsk_interactive_marker plugin to modern plugin style
  • add plugin to show usage
  • delete empty lines
  • Merge branch 'master' into add-plugin-for-jsk-interactive-marker Conflicts: jsk_teleop_joy/manifest.xml jsk_teleop_joy/package.xml jsk_teleop_joy/src/jsk_teleop_joy/plugin/joy_pose_6d.py
  • modify launch file
  • jsk_teleop_joy depends on jsk_rviz_plugins
  • update moveit teleop plugin to the latest change of moveit
  • add center button to JoyStatus class and use center button to choose menu
  • add new plugin to relay and convert joy message to ps3
  • add Relay plugin to jsk_teleop_joy
  • use singleton class to maintain view point of rviz to have persistency across several plugins
  • show overlay menu on rviz to swtich plugins
  • support multiple instances per one plugin class
  • use diagnostic_updater package to generate diagnostic messages rather than publish diagnostic_msgs directly
  • optimize rviz animation smoother by joy stick controller
  • support jsk_teleop_joy in robot-controller-sample.launch of jsk_ik_server
  • publish the status of jsk_teleop_joy to /diagnostics. decrease the number of the messages if the joy stick type is failed to be estimated. publish the status of the estimation to /diagnostics
  • make interactive_midi_config available for hydro
  • fix midi_config_player for groovy
  • make midi_config_player available for hydro
  • add button to control interactive marker
  • transform PoseStamped when setting marker pose
  • add method to set pose
  • add method to change move arm
  • use triangle button to send menu
  • fix find -> find_module to detect catkin or rosbuild
  • add config for padcontrol
  • support groovy on all the plugins
  • use imp module to decide use load_manifest or not
  • send 'move' when circle button is pushed
  • add dependancy on jsk_interactive_marker
  • rename plugin scripts to avoid msg import bug
  • add import statement
  • use load_manifest on groovy
  • use load_manifest on groovy
  • add end effector controller interface
  • JoyFootstepPlanner: publish execute if circle button is pushed
  • JoyFootstepPlanner: reset goal pose if cross button is pushed
  • determines the initial position of goal according to the specified frame_id and offset for the legs
  • add tf_ext.py to jsk_teleop_joy. it's a set of utitlity function for tf
  • revert to use depend tag for view_controller_msgs
  • write about select button
  • write about how to implement plugin
  • write about how to export the plugins
  • update docs
  • use upper case for MIDI
  • add list of plugins
  • update docs
  • update docs
  • add link to each script
  • update some docs
  • add document about [midi_write.py]{.title-ref}
  • add movie of interactive configuretion of midi device
  • use english in README.md#interactive_midi_config.py
  • fix style of ordered list
  • #2: automatically detect the game controller type at joy_footstep.launch use type=auto parameter
  • #2: rename xbox.launch and xbox_footstep.launch to joy.launch and joy_footsetp.launch. it support many game controllers now and the name did not match the current state.
  • #2: detect ps3 wireless automatically
  • #2: use auto mode as default
  • #2: update document about ps3 bluetooth
  • mv jsk_joy/ jsk_teleop_joy/
  • rename jsk_joy -> jsk_telop_joy
  • fix to use rosdep
  • adding footstep planning demo plugin
  • updating the parameters
  • arg1 = topic name, arg2 = device name
  • fix topic name
  • install subdirectory into dist_package
  • auto detecting xbox/ps3wired
  • use joy_main as a wrapper of jsk_joy python library
  • not use roslib.load_manifest if the distro is hydro
  • installing launch file and so on
  • catkinized jsk_joy package
  • changed frame from base_link to odom
  • added JoyGoPos for plugin.xml
  • added gopos.py for teleoperation locomotion command
  • added gopos.launch for teleoperation locomotion command
  • sample launch for marker_6dof
  • tuned parameters to move camera
  • adding moveit plugin for controlling moveit from gaming controllers
  • launch file for pr2 moveit
  • adding README
  • adding configuration for launchpad mini
  • adding output configuration to QuNeo
  • supporting output of MIDI
  • adding script to test output of midi devices
  • mapping buttons automatically from axes
  • update midi configuration
  • script to verbose midi input
  • not printing input
  • adding nanokontrol2.yaml
  • updating configuration file
  • supporting 144/128 key event
  • adding config file for icontrols pro
  • adding scripts to configure midi device interactively
  • changing joy footstep planner plugin to use footstep marker in jsk_interactive_marker
  • adding interface to call footstep planning from game controllers
  • adding verbose plugin for debugging and support wired ps3 controller
  • add nanopad2_joy.py, touchpad and scene button supported
  • adding sample to run xbox footstep plugin
  • update orientation way to local
  • supporting local z movement acoording to orientation
  • adding manual footstep generator interface
  • updating parameters of view rotation
  • test pulibhs program for joystick, any joystick ok?
  • supports to toggle follow view mode
  • devided trackpoint joy publisher and status class to two files.
  • added nanopad_joy.py nanopad_status.py for KORG nanoPAD2
  • updating some parameters
  • supporting pitch and roll
  • implementing jsk_joy as plugin system
  • changed class name of nanokontrol status: NanoKONTROL2 -> NanoKONTROL2Status
  • add nanokontrol_status.py. convert data from Joy msg to nanoKONTROL class instance.
  • support touchpad; auto-detect device id
  • light turns on when button is pushed
  • added device link URL of vestax_spin2
  • added trackpoint_joy.py. publish thinkpad trackpoint status as Joy.
  • bugfix button type
  • set vestax_spin2.py execuable
  • chnaged button index of akailpd8. set for PROG1 PAD mode.
  • bugfix indent
  • added URL of device web page for lanchpad
  • add controller for vestax spin 2
  • added akaiLPD8.py
  • added device URL link for nanokontrol
  • add script to publish joy_message with launchpad mini
  • deleted debug outpu in nanokontrol_joy.py
  • add rosdep name=python
  • added nanokontrol_joy.py for publishing nanoKONTROL2 input as Joy.
  • update some parameters
  • update some parameters
  • using left analog to zoom in/out
  • introducing new package: jsk_joy
  • Contributors: Kei Okada, Masaki Murooka, Ryohei Ueda, Satoshi Iwaishi, Yuki Furuta, Yusuke Furuta, Shunichi Nozawa, Shintaro Noda, Youhei Kakiuchi

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Launch files

Messages

No message files found.

Services

No service files found

Plugins

Recent questions tagged jsk_teleop_joy at Robotics Stack Exchange

Package Summary

Tags No category tags.
Version 0.1.18
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/jsk-ros-pkg/jsk_control.git
VCS Type git
VCS Version master
Last Updated 2024-12-09
Dev Status DEVELOPED
CI status Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

jsk_teleop_joy

Additional Links

Maintainers

  • Ryohei Ueda

Authors

  • Ryohei Ueda

jsk_teleop_joy package

Introduction

This package provides physical UI for teleoperatoin such as joy sticks, game controllers and MIDI instruments.

Supported game controllers

This package supports following game controllers:

  1. XBox360 controller
  2. PS3 Controller (Bluetooth)
  3. PS3 Controller (USB)

In order to use PS3 controller via Bluetooth, see this instruction.

Architecture of jsk_teleop_joy

jsk_teleop_joy (the main script is joy_main.py) is based on plugin architecture.

ROS packages provides the plugins for jsk_teleop_joy and each plugin represents a function such as “specify 6D pose of the end effector”.

You can enable some plugins and choose which plugin you want to use by “Pushing Select Button”.

jsk_teleop_joy plugins out of box

  • VerboseStatus
  • JoyPose6D
  • JoyFootstep
  • JoyFootstepPlanner
  • JoyFootstepPlannerDemo
  • JoyMoveIt
  • JoyGoPos

How to implement a plugin

  1. write xml file to define plugins.
  2. Export the xml file from your ROS package using manifest.xml or package.xml.
  3. implement plugin

Write xml file to define plugins

jsk_teleop_joy reads the plugin definition from a xml file like plugin.xml.

That xml should be like:

<library>
  <class name="Foo" type="your_package.foo">
  </class>
</library>

The xml file should have <library> tag at the top level. And you can define plugins by <class> tag.

  • name attribute means the name of the plugin. You will choose plugins by this name in your launch files (example).
  • type attribute means the python class of the plugin. jsk_teleop_joy tries to instantiate plugin class using thie type name.

Export the xml file from your ROS package

You need to export that xml file using <export> tag and <jsk_teleop_joy> tag in your manifest.xml or package.xml.

These two files, manifest.xml, package.xml, are good examples.

Implement a plugin

Finally, you can implement a jsk_teleop_joy plugin.

VerboseStatus Plugin is a good example how to implement a plugin.

__init__ method

All the plugins are required to inherits jsk_teleop_joy.joy_plugin.JSKJoyPlugin and call JSKJoyPlugin.__init__ in its __init__ constructor.

class VerboseStatus(jsk_teleop_joy.joy_plugin.JSKJoyPlugin):
  def __init__(self):
    jsk_teleop_joy.joy_plugin.JSKJoyPlugin.__init__(self, 'VerbosePlugin')

joyCB method

Each time jsk_teleop_joy receives /joy message, it calls joyCB method of the active plugin.

  def joyCB(self, status, history):
    rospy.loginfo('analog left (%f, %f)' % (status.left_analog_x, status.left_analog_y))

The 2nd argument of joyCB is an instance of JoyStatus. JoyStatus is one of XboxStatus, PS3Status and PS3WiredStatus. This means the latest message from /joy. These 3 classes provide the same interface and you don’t need to care about which controller the user uses.

On the other hand, the 3rd argument of joyCB (history), is a sequence of JoyStatus. it’s an instance of StatusHistory. It means a hisotry of recent JoyStatus.

SELECT button

jsk_teleop_joy system occupies SELECT button so you cannot use SELECT button in your plugin. SELECT button is used for switching plugins.

MIDI controllers

interactive_midi_config.py

You can configure MIDI devices by this script interactively. movie

  1. Connect you MIDI device.
  2. First, the script asks the name of device, please choose the device you want to use.
  3. Second, please push the buttons/slide the faders in the order you want to get as sensor_msgs/Joy. The script maps those buttons to sensor_msgs/Joy/axes (and sensor_msgs/Joy/buttons if possible).
  4. Please type q to quit. And the configure will be saved into /tmp/midi.yaml.
  • Troubleshooting:

For Ubuntu18.04 and pygame2.0.1 installed by pip, python -c "import pygame.midi; pygame.midi.init()" returns error below;

 ALSA lib conf.c:3558:(snd_config_hooks_call) Cannot open shared library libasound_module_conf_pulse.so (/usr/lib/alsa-lib/libasound_module_conf_pulse.so: libasound_module_conf_pulse.so: cannot open shared object file: No such file or directory)
ALSA lib seq.c:935:(snd_seq_open_noupdate) Unknown SEQ default

In this case, you need to get pygame from apt i.e pip uninstall pygame && apt-get install python-pygame

NOT RECOMMENDED: Or if you really want to keep using pip installed pygame, you can make symbolic link i.e. ln -s /usr/lib/x86_64-linux-gnu/alsa-lib /usr/lib/alsa-lib: BUT WE DO NOT RECOMMED

midi_write.py

In order to control LEDs and active faders, need to output some MIDI commands from you computer. The script midi_write.py helps to dig the command and you can save the configuration to a yaml file by -w option.

midi_config_player.py

This script publishes sensor_msgs/Joy to /joy based on a yaml file configured by interactive_midi_config.py and midi_write.py.

configs directory includes some yaml files for several MIDI devices.

CHANGELOG

Changelog for package jsk_teleop_joy

0.1.18 (2024-12-09)

  • [jsk_teleop_joy] support midi launchpad X (#789)
  • [jsk_teleop_joy] python3-pygame is required on noetic (#787)
  • Contributors: Shun Hasegawa, Yoshiki Obinata

0.1.17 (2023-05-28)

0.1.16 (2022-10-27)

  • fix for python3 (#776)
  • add from __future_ import print_function (#773)
  • [README.md] delete pip instruction and recommend apt version only (#760)
  • fix for python3 (#763)
    • 2to3 -w -fexcept .
    • 2to3 -w -fprint .
    • update readme
    • Update jsk_teleop_joy/README.md
  • Add ipega controller support (#716)
    • Fixed a key setting mistake. Add controller_type ipega as a possible input for joy_status
    • Add ipega controller support
  • Contributors: Shingo Kitagawa, Iki Yo, Kei Okada, Yoichiro Kawamura

0.1.15 (2018-05-16)

  • Merge pull request #693 from k-okada/fix_apt_slow remove unused build_depends
  • remove unused build_depends
  • Contributors: Kei Okada

0.1.14 (2018-01-15)

0.1.13 (2017-04-18)

  • [jsk_footstep_planner, jsk_teleop_joy] add stack mode to footstep_marker
  • [jsk_teleop_joy] Remove / from default frame_id in pose6d plugin
  • [jsk_teleop_joy] update view control in rviz using teleop_joy
  • Contributors: Yohei Kakiuchi

0.1.12 (2017-02-22)

0.1.11 (2017-02-09)

0.1.10 (2016-12-15)

  • [jsk_teleop_joy] package.xml : add pygame run depend (#657)
  • Add toggle footstep marker mode joy interface (#607)
    • src/jsk_teleop_joy/plugin/joy_footstep_marker.py: Add joy interface to toggle planning mode
  • Add plugin to send cmd_vel from joystick contorller (#600)
    • [jsk_teleop_joy] src/jsk_teleop_joy/joy.py : Add plugin_package option to JoyManager to use joy plugins in other packages
    • [jsk_teleop_joy] src/jsk_teleop_joy/plugin/joy_cmd_vel.py : Add orthogonal_axis_mode, which does not allow diagonal movement
    • [jsk_teleop_joy] src/jsk_teleop_joy/plugin/joy_cmd_vel.py : Add plugin to send cmd_vel from joystick contorller
  • Add utility tools for jaxon footstep planner (#598)
    • [jsk_footstep_planner] launch/joy_footstep_marker.launch : Add joy_footstep_marker launch, which control footstep_marker from joystick controller
  • Project odom_init to detected floor (#579)
    • [jsk_teleop_joy] Check result of service call by exception handling
    • [jsk_teleop_joy] Display OverlayMenu before execute footstep
    • [jsk_teleop_joy] sync pre_pose in joy_footstep_marker only at first of the pose update sequence
    • [jsk_teleop_joy] Add marker_name arg to getCurrentMarkerPose and initialize marker by initial_footstep_marker in reset process
    • [jsk_teleop_joy] Add footstep marker synchonization to joy_footstep_marker
    • [jsk_teleop_joy] Add joycontroller interface plugin for footstep_marker
  • Contributors: Kanae Kochigami, Iory Kumagai

0.1.9 (2016-03-23)

0.1.8 (2015-11-02)

0.1.7 (2015-11-01)

  • [jsk_teleop_joy/joy_relative_converter.py] add reset command
  • [jsk_teleop_joy/scripts/joy_relative_converter.py] fix bug to support buttons
  • Revert "[jsk_teleop_joy/scripts/joy_relative_converter.py] fix bug to support buttons" This reverts commit 1704b24d2b96aae962e4c87968f68078442417a2.
  • [jsk_teleop_joy/scripts/joy_relative_converter.py] fix bug to support buttons
  • put most process into class method Conflicts: jsk_teleop_joy/scripts/joy_relative_converter.py
  • instantiate before subscribe Conflicts: jsk_teleop_joy/scripts/joy_relative_converter.py
  • fix bug around page-change
  • implement page-change
  • add joy_relative_converter
  • [jsk_footstep_controller, jsk_teleop_joy] Use footstep-controller.l and lock/unlock furutaractive model during exeucuting footsteps
  • Remove manifest.xml and Makefile and use catkin style filesystem
  • Contributors: Ryohei Ueda, Satoshi Iwaishi

0.1.6 (2015-06-11)

  • [drc_task_common] Modify threshold of brake: 0.9 -> 0.5
  • [jsk_teleop_joy] Subscribe execute flag and disable update command when execute flag is false
  • [jsk_teleop_joy] Call wait_for_message only once in synchronize
  • [jsk_teleop_joy] synchronizeAllCommand do not takes argument
  • [jsk_teleop_joy] Support single synchroniation
  • [jsk_teleop_joy] Fix neck-p/y joint command range
  • [jsk_teleop_joy] Add initialization service to vehicle joy
  • [jsk_teleop_joy] Add synchronize method to vehicle plugin to prevent overwrite previous command when respown
  • [jsk_teleop_joy] Remove set_current_step_as_max functions because they are moved to vehicle_ui
  • [jsk_teleop_joy] Add neck-p interface to joystick controller for vehicle task
  • [jsk_teleop_joy] Speed down handling command: 0.05->0.025
  • [jsk_teleop_joy] Do not set 0.0 command as max step
  • [jsk_teleop_joy] Add set_current_step_as_max function to vehicle_ui
  • [jsk_teleop_joy] Modify teleop command in joystick controller for vehicle task
  • [jsk_teleop_joy] Rename vehicle.launch to joy_vehicle.launch
  • [jsk_teleop_joy] Add neck_angle_max valiable
  • [jsk_teleop_joy] Add functions for look around to vehicle.launch
  • Add brake command and modify accel command specification
  • Add arguments to determine joystick dev path and namespace for ocs
  • [jsk_teleop_joy] Adjsut command publish rate for vehicle
  • [jsk_teleop_joy] Adjsut handle resolution and modify to publish topic constantly
  • [jsk_teleop_joy] Add joystick program for vehicle
  • remove DEV argument because it was removed from robot_trackball_head.launch

0.1.5 (2015-01-08)

  • [joy_mouse] Use name of kensington mouse and remove dev file specification. [jsk_teleop_joy] Remove DEV argument
  • add script to publish pose stamped with spacenav
  • Fix poping-up cancel window by broadcasting canceled information
  • add api to change successor
  • Add text publishing when checking breakpoint
  • Publish usage of footstep planner joy
  • disable/enable head control with trackball buttons, move head joint continuously.
  • Contributors: Masaki Murooka, Ryohei Ueda, Yusuke Furuta

0.1.4 (2014-10-21)

  • Merge pull request #112 from mmurooka/overwrite-write-command-in-midi-player Overwrite writing command in midi_config_player.py
  • overwrite writing command in midi_config_player.py
  • add pr2_relay.launch
  • publish joy topic only when midi state is changed.
  • add feedback config to b-control.yaml

0.1.3 (2014-10-10)

  • add b_control_status.py
  • add config file of b-control
  • Add joystick interface for jsk_pcl_ros/EnvironmentPlaneModeling
  • use scripts/head_control_by_trackball.py for general robot. implimented launch file for pr2 and hrp2
  • Merge branch 'master' into select-menu-with-analog-stick
  • autorepeat joy input
  • check analog input
  • remap tf
  • test analog check
  • get argument for set pose

0.1.2 (2014-09-08)

0.1.1 (2014-09-04)

  • remap joint states and DEV
  • add script to control head via trackball
  • remove trackpoint_joy.py
  • mvoe python scripts to parse state to src directory
  • fix bag at first time
  • update menu
  • publish at 10hz
  • set autorepeat rate
  • use joy mux
  • make JoyStatus class
  • fix the menu when walking is canceled and update the pose from joy stick according to the snapped pose availble by marker
  • pop menu when cancel the footstep and support resuming from joystick
  • cancel walking via joystick
  • update diagnostics information about footstep planning and joy stick stuff
  • compile euslisp file before running footstep planner
  • circle button to move arm
  • Merge branch 'master' into fix-jsk-interactive-marker-plugin Conflicts: jsk_teleop_joy/launch/pr2.launch
    • remove jsk_interactive_marker.launch and integrate it to pr2.launch
    • rewrite jsk_interactive_marker plugin to modern plugin style
  • add plugin to show usage
  • delete empty lines
  • Merge branch 'master' into add-plugin-for-jsk-interactive-marker Conflicts: jsk_teleop_joy/manifest.xml jsk_teleop_joy/package.xml jsk_teleop_joy/src/jsk_teleop_joy/plugin/joy_pose_6d.py
  • modify launch file
  • jsk_teleop_joy depends on jsk_rviz_plugins
  • update moveit teleop plugin to the latest change of moveit
  • add center button to JoyStatus class and use center button to choose menu
  • add new plugin to relay and convert joy message to ps3
  • add Relay plugin to jsk_teleop_joy
  • use singleton class to maintain view point of rviz to have persistency across several plugins
  • show overlay menu on rviz to swtich plugins
  • support multiple instances per one plugin class
  • use diagnostic_updater package to generate diagnostic messages rather than publish diagnostic_msgs directly
  • optimize rviz animation smoother by joy stick controller
  • support jsk_teleop_joy in robot-controller-sample.launch of jsk_ik_server
  • publish the status of jsk_teleop_joy to /diagnostics. decrease the number of the messages if the joy stick type is failed to be estimated. publish the status of the estimation to /diagnostics
  • make interactive_midi_config available for hydro
  • fix midi_config_player for groovy
  • make midi_config_player available for hydro
  • add button to control interactive marker
  • transform PoseStamped when setting marker pose
  • add method to set pose
  • add method to change move arm
  • use triangle button to send menu
  • fix find -> find_module to detect catkin or rosbuild
  • add config for padcontrol
  • support groovy on all the plugins
  • use imp module to decide use load_manifest or not
  • send 'move' when circle button is pushed
  • add dependancy on jsk_interactive_marker
  • rename plugin scripts to avoid msg import bug
  • add import statement
  • use load_manifest on groovy
  • use load_manifest on groovy
  • add end effector controller interface
  • JoyFootstepPlanner: publish execute if circle button is pushed
  • JoyFootstepPlanner: reset goal pose if cross button is pushed
  • determines the initial position of goal according to the specified frame_id and offset for the legs
  • add tf_ext.py to jsk_teleop_joy. it's a set of utitlity function for tf
  • revert to use depend tag for view_controller_msgs
  • write about select button
  • write about how to implement plugin
  • write about how to export the plugins
  • update docs
  • use upper case for MIDI
  • add list of plugins
  • update docs
  • update docs
  • add link to each script
  • update some docs
  • add document about [midi_write.py]{.title-ref}
  • add movie of interactive configuretion of midi device
  • use english in README.md#interactive_midi_config.py
  • fix style of ordered list
  • #2: automatically detect the game controller type at joy_footstep.launch use type=auto parameter
  • #2: rename xbox.launch and xbox_footstep.launch to joy.launch and joy_footsetp.launch. it support many game controllers now and the name did not match the current state.
  • #2: detect ps3 wireless automatically
  • #2: use auto mode as default
  • #2: update document about ps3 bluetooth
  • mv jsk_joy/ jsk_teleop_joy/
  • rename jsk_joy -> jsk_telop_joy
  • fix to use rosdep
  • adding footstep planning demo plugin
  • updating the parameters
  • arg1 = topic name, arg2 = device name
  • fix topic name
  • install subdirectory into dist_package
  • auto detecting xbox/ps3wired
  • use joy_main as a wrapper of jsk_joy python library
  • not use roslib.load_manifest if the distro is hydro
  • installing launch file and so on
  • catkinized jsk_joy package
  • changed frame from base_link to odom
  • added JoyGoPos for plugin.xml
  • added gopos.py for teleoperation locomotion command
  • added gopos.launch for teleoperation locomotion command
  • sample launch for marker_6dof
  • tuned parameters to move camera
  • adding moveit plugin for controlling moveit from gaming controllers
  • launch file for pr2 moveit
  • adding README
  • adding configuration for launchpad mini
  • adding output configuration to QuNeo
  • supporting output of MIDI
  • adding script to test output of midi devices
  • mapping buttons automatically from axes
  • update midi configuration
  • script to verbose midi input
  • not printing input
  • adding nanokontrol2.yaml
  • updating configuration file
  • supporting 144/128 key event
  • adding config file for icontrols pro
  • adding scripts to configure midi device interactively
  • changing joy footstep planner plugin to use footstep marker in jsk_interactive_marker
  • adding interface to call footstep planning from game controllers
  • adding verbose plugin for debugging and support wired ps3 controller
  • add nanopad2_joy.py, touchpad and scene button supported
  • adding sample to run xbox footstep plugin
  • update orientation way to local
  • supporting local z movement acoording to orientation
  • adding manual footstep generator interface
  • updating parameters of view rotation
  • test pulibhs program for joystick, any joystick ok?
  • supports to toggle follow view mode
  • devided trackpoint joy publisher and status class to two files.
  • added nanopad_joy.py nanopad_status.py for KORG nanoPAD2
  • updating some parameters
  • supporting pitch and roll
  • implementing jsk_joy as plugin system
  • changed class name of nanokontrol status: NanoKONTROL2 -> NanoKONTROL2Status
  • add nanokontrol_status.py. convert data from Joy msg to nanoKONTROL class instance.
  • support touchpad; auto-detect device id
  • light turns on when button is pushed
  • added device link URL of vestax_spin2
  • added trackpoint_joy.py. publish thinkpad trackpoint status as Joy.
  • bugfix button type
  • set vestax_spin2.py execuable
  • chnaged button index of akailpd8. set for PROG1 PAD mode.
  • bugfix indent
  • added URL of device web page for lanchpad
  • add controller for vestax spin 2
  • added akaiLPD8.py
  • added device URL link for nanokontrol
  • add script to publish joy_message with launchpad mini
  • deleted debug outpu in nanokontrol_joy.py
  • add rosdep name=python
  • added nanokontrol_joy.py for publishing nanoKONTROL2 input as Joy.
  • update some parameters
  • update some parameters
  • using left analog to zoom in/out
  • introducing new package: jsk_joy
  • Contributors: Kei Okada, Masaki Murooka, Ryohei Ueda, Satoshi Iwaishi, Yuki Furuta, Yusuke Furuta, Shunichi Nozawa, Shintaro Noda, Youhei Kakiuchi

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Launch files

Messages

No message files found.

Services

No service files found

Plugins

Recent questions tagged jsk_teleop_joy at Robotics Stack Exchange

Package Summary

Tags No category tags.
Version 0.1.18
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/jsk-ros-pkg/jsk_control.git
VCS Type git
VCS Version master
Last Updated 2024-12-09
Dev Status DEVELOPED
CI status
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

jsk_teleop_joy

Additional Links

Maintainers

  • Ryohei Ueda

Authors

  • Ryohei Ueda

jsk_teleop_joy package

Introduction

This package provides physical UI for teleoperatoin such as joy sticks, game controllers and MIDI instruments.

Supported game controllers

This package supports following game controllers:

  1. XBox360 controller
  2. PS3 Controller (Bluetooth)
  3. PS3 Controller (USB)

In order to use PS3 controller via Bluetooth, see this instruction.

Architecture of jsk_teleop_joy

jsk_teleop_joy (the main script is joy_main.py) is based on plugin architecture.

ROS packages provides the plugins for jsk_teleop_joy and each plugin represents a function such as “specify 6D pose of the end effector”.

You can enable some plugins and choose which plugin you want to use by “Pushing Select Button”.

jsk_teleop_joy plugins out of box

  • VerboseStatus
  • JoyPose6D
  • JoyFootstep
  • JoyFootstepPlanner
  • JoyFootstepPlannerDemo
  • JoyMoveIt
  • JoyGoPos

How to implement a plugin

  1. write xml file to define plugins.
  2. Export the xml file from your ROS package using manifest.xml or package.xml.
  3. implement plugin

Write xml file to define plugins

jsk_teleop_joy reads the plugin definition from a xml file like plugin.xml.

That xml should be like:

<library>
  <class name="Foo" type="your_package.foo">
  </class>
</library>

The xml file should have <library> tag at the top level. And you can define plugins by <class> tag.

  • name attribute means the name of the plugin. You will choose plugins by this name in your launch files (example).
  • type attribute means the python class of the plugin. jsk_teleop_joy tries to instantiate plugin class using thie type name.

Export the xml file from your ROS package

You need to export that xml file using <export> tag and <jsk_teleop_joy> tag in your manifest.xml or package.xml.

These two files, manifest.xml, package.xml, are good examples.

Implement a plugin

Finally, you can implement a jsk_teleop_joy plugin.

VerboseStatus Plugin is a good example how to implement a plugin.

__init__ method

All the plugins are required to inherits jsk_teleop_joy.joy_plugin.JSKJoyPlugin and call JSKJoyPlugin.__init__ in its __init__ constructor.

class VerboseStatus(jsk_teleop_joy.joy_plugin.JSKJoyPlugin):
  def __init__(self):
    jsk_teleop_joy.joy_plugin.JSKJoyPlugin.__init__(self, 'VerbosePlugin')

joyCB method

Each time jsk_teleop_joy receives /joy message, it calls joyCB method of the active plugin.

  def joyCB(self, status, history):
    rospy.loginfo('analog left (%f, %f)' % (status.left_analog_x, status.left_analog_y))

The 2nd argument of joyCB is an instance of JoyStatus. JoyStatus is one of XboxStatus, PS3Status and PS3WiredStatus. This means the latest message from /joy. These 3 classes provide the same interface and you don’t need to care about which controller the user uses.

On the other hand, the 3rd argument of joyCB (history), is a sequence of JoyStatus. it’s an instance of StatusHistory. It means a hisotry of recent JoyStatus.

SELECT button

jsk_teleop_joy system occupies SELECT button so you cannot use SELECT button in your plugin. SELECT button is used for switching plugins.

MIDI controllers

interactive_midi_config.py

You can configure MIDI devices by this script interactively. movie

  1. Connect you MIDI device.
  2. First, the script asks the name of device, please choose the device you want to use.
  3. Second, please push the buttons/slide the faders in the order you want to get as sensor_msgs/Joy. The script maps those buttons to sensor_msgs/Joy/axes (and sensor_msgs/Joy/buttons if possible).
  4. Please type q to quit. And the configure will be saved into /tmp/midi.yaml.
  • Troubleshooting:

For Ubuntu18.04 and pygame2.0.1 installed by pip, python -c "import pygame.midi; pygame.midi.init()" returns error below;

 ALSA lib conf.c:3558:(snd_config_hooks_call) Cannot open shared library libasound_module_conf_pulse.so (/usr/lib/alsa-lib/libasound_module_conf_pulse.so: libasound_module_conf_pulse.so: cannot open shared object file: No such file or directory)
ALSA lib seq.c:935:(snd_seq_open_noupdate) Unknown SEQ default

In this case, you need to get pygame from apt i.e pip uninstall pygame && apt-get install python-pygame

NOT RECOMMENDED: Or if you really want to keep using pip installed pygame, you can make symbolic link i.e. ln -s /usr/lib/x86_64-linux-gnu/alsa-lib /usr/lib/alsa-lib: BUT WE DO NOT RECOMMED

midi_write.py

In order to control LEDs and active faders, need to output some MIDI commands from you computer. The script midi_write.py helps to dig the command and you can save the configuration to a yaml file by -w option.

midi_config_player.py

This script publishes sensor_msgs/Joy to /joy based on a yaml file configured by interactive_midi_config.py and midi_write.py.

configs directory includes some yaml files for several MIDI devices.

CHANGELOG

Changelog for package jsk_teleop_joy

0.1.18 (2024-12-09)

  • [jsk_teleop_joy] support midi launchpad X (#789)
  • [jsk_teleop_joy] python3-pygame is required on noetic (#787)
  • Contributors: Shun Hasegawa, Yoshiki Obinata

0.1.17 (2023-05-28)

0.1.16 (2022-10-27)

  • fix for python3 (#776)
  • add from __future_ import print_function (#773)
  • [README.md] delete pip instruction and recommend apt version only (#760)
  • fix for python3 (#763)
    • 2to3 -w -fexcept .
    • 2to3 -w -fprint .
    • update readme
    • Update jsk_teleop_joy/README.md
  • Add ipega controller support (#716)
    • Fixed a key setting mistake. Add controller_type ipega as a possible input for joy_status
    • Add ipega controller support
  • Contributors: Shingo Kitagawa, Iki Yo, Kei Okada, Yoichiro Kawamura

0.1.15 (2018-05-16)

  • Merge pull request #693 from k-okada/fix_apt_slow remove unused build_depends
  • remove unused build_depends
  • Contributors: Kei Okada

0.1.14 (2018-01-15)

0.1.13 (2017-04-18)

  • [jsk_footstep_planner, jsk_teleop_joy] add stack mode to footstep_marker
  • [jsk_teleop_joy] Remove / from default frame_id in pose6d plugin
  • [jsk_teleop_joy] update view control in rviz using teleop_joy
  • Contributors: Yohei Kakiuchi

0.1.12 (2017-02-22)

0.1.11 (2017-02-09)

0.1.10 (2016-12-15)

  • [jsk_teleop_joy] package.xml : add pygame run depend (#657)
  • Add toggle footstep marker mode joy interface (#607)
    • src/jsk_teleop_joy/plugin/joy_footstep_marker.py: Add joy interface to toggle planning mode
  • Add plugin to send cmd_vel from joystick contorller (#600)
    • [jsk_teleop_joy] src/jsk_teleop_joy/joy.py : Add plugin_package option to JoyManager to use joy plugins in other packages
    • [jsk_teleop_joy] src/jsk_teleop_joy/plugin/joy_cmd_vel.py : Add orthogonal_axis_mode, which does not allow diagonal movement
    • [jsk_teleop_joy] src/jsk_teleop_joy/plugin/joy_cmd_vel.py : Add plugin to send cmd_vel from joystick contorller
  • Add utility tools for jaxon footstep planner (#598)
    • [jsk_footstep_planner] launch/joy_footstep_marker.launch : Add joy_footstep_marker launch, which control footstep_marker from joystick controller
  • Project odom_init to detected floor (#579)
    • [jsk_teleop_joy] Check result of service call by exception handling
    • [jsk_teleop_joy] Display OverlayMenu before execute footstep
    • [jsk_teleop_joy] sync pre_pose in joy_footstep_marker only at first of the pose update sequence
    • [jsk_teleop_joy] Add marker_name arg to getCurrentMarkerPose and initialize marker by initial_footstep_marker in reset process
    • [jsk_teleop_joy] Add footstep marker synchonization to joy_footstep_marker
    • [jsk_teleop_joy] Add joycontroller interface plugin for footstep_marker
  • Contributors: Kanae Kochigami, Iory Kumagai

0.1.9 (2016-03-23)

0.1.8 (2015-11-02)

0.1.7 (2015-11-01)

  • [jsk_teleop_joy/joy_relative_converter.py] add reset command
  • [jsk_teleop_joy/scripts/joy_relative_converter.py] fix bug to support buttons
  • Revert "[jsk_teleop_joy/scripts/joy_relative_converter.py] fix bug to support buttons" This reverts commit 1704b24d2b96aae962e4c87968f68078442417a2.
  • [jsk_teleop_joy/scripts/joy_relative_converter.py] fix bug to support buttons
  • put most process into class method Conflicts: jsk_teleop_joy/scripts/joy_relative_converter.py
  • instantiate before subscribe Conflicts: jsk_teleop_joy/scripts/joy_relative_converter.py
  • fix bug around page-change
  • implement page-change
  • add joy_relative_converter
  • [jsk_footstep_controller, jsk_teleop_joy] Use footstep-controller.l and lock/unlock furutaractive model during exeucuting footsteps
  • Remove manifest.xml and Makefile and use catkin style filesystem
  • Contributors: Ryohei Ueda, Satoshi Iwaishi

0.1.6 (2015-06-11)

  • [drc_task_common] Modify threshold of brake: 0.9 -> 0.5
  • [jsk_teleop_joy] Subscribe execute flag and disable update command when execute flag is false
  • [jsk_teleop_joy] Call wait_for_message only once in synchronize
  • [jsk_teleop_joy] synchronizeAllCommand do not takes argument
  • [jsk_teleop_joy] Support single synchroniation
  • [jsk_teleop_joy] Fix neck-p/y joint command range
  • [jsk_teleop_joy] Add initialization service to vehicle joy
  • [jsk_teleop_joy] Add synchronize method to vehicle plugin to prevent overwrite previous command when respown
  • [jsk_teleop_joy] Remove set_current_step_as_max functions because they are moved to vehicle_ui
  • [jsk_teleop_joy] Add neck-p interface to joystick controller for vehicle task
  • [jsk_teleop_joy] Speed down handling command: 0.05->0.025
  • [jsk_teleop_joy] Do not set 0.0 command as max step
  • [jsk_teleop_joy] Add set_current_step_as_max function to vehicle_ui
  • [jsk_teleop_joy] Modify teleop command in joystick controller for vehicle task
  • [jsk_teleop_joy] Rename vehicle.launch to joy_vehicle.launch
  • [jsk_teleop_joy] Add neck_angle_max valiable
  • [jsk_teleop_joy] Add functions for look around to vehicle.launch
  • Add brake command and modify accel command specification
  • Add arguments to determine joystick dev path and namespace for ocs
  • [jsk_teleop_joy] Adjsut command publish rate for vehicle
  • [jsk_teleop_joy] Adjsut handle resolution and modify to publish topic constantly
  • [jsk_teleop_joy] Add joystick program for vehicle
  • remove DEV argument because it was removed from robot_trackball_head.launch

0.1.5 (2015-01-08)

  • [joy_mouse] Use name of kensington mouse and remove dev file specification. [jsk_teleop_joy] Remove DEV argument
  • add script to publish pose stamped with spacenav
  • Fix poping-up cancel window by broadcasting canceled information
  • add api to change successor
  • Add text publishing when checking breakpoint
  • Publish usage of footstep planner joy
  • disable/enable head control with trackball buttons, move head joint continuously.
  • Contributors: Masaki Murooka, Ryohei Ueda, Yusuke Furuta

0.1.4 (2014-10-21)

  • Merge pull request #112 from mmurooka/overwrite-write-command-in-midi-player Overwrite writing command in midi_config_player.py
  • overwrite writing command in midi_config_player.py
  • add pr2_relay.launch
  • publish joy topic only when midi state is changed.
  • add feedback config to b-control.yaml

0.1.3 (2014-10-10)

  • add b_control_status.py
  • add config file of b-control
  • Add joystick interface for jsk_pcl_ros/EnvironmentPlaneModeling
  • use scripts/head_control_by_trackball.py for general robot. implimented launch file for pr2 and hrp2
  • Merge branch 'master' into select-menu-with-analog-stick
  • autorepeat joy input
  • check analog input
  • remap tf
  • test analog check
  • get argument for set pose

0.1.2 (2014-09-08)

0.1.1 (2014-09-04)

  • remap joint states and DEV
  • add script to control head via trackball
  • remove trackpoint_joy.py
  • mvoe python scripts to parse state to src directory
  • fix bag at first time
  • update menu
  • publish at 10hz
  • set autorepeat rate
  • use joy mux
  • make JoyStatus class
  • fix the menu when walking is canceled and update the pose from joy stick according to the snapped pose availble by marker
  • pop menu when cancel the footstep and support resuming from joystick
  • cancel walking via joystick
  • update diagnostics information about footstep planning and joy stick stuff
  • compile euslisp file before running footstep planner
  • circle button to move arm
  • Merge branch 'master' into fix-jsk-interactive-marker-plugin Conflicts: jsk_teleop_joy/launch/pr2.launch
    • remove jsk_interactive_marker.launch and integrate it to pr2.launch
    • rewrite jsk_interactive_marker plugin to modern plugin style
  • add plugin to show usage
  • delete empty lines
  • Merge branch 'master' into add-plugin-for-jsk-interactive-marker Conflicts: jsk_teleop_joy/manifest.xml jsk_teleop_joy/package.xml jsk_teleop_joy/src/jsk_teleop_joy/plugin/joy_pose_6d.py
  • modify launch file
  • jsk_teleop_joy depends on jsk_rviz_plugins
  • update moveit teleop plugin to the latest change of moveit
  • add center button to JoyStatus class and use center button to choose menu
  • add new plugin to relay and convert joy message to ps3
  • add Relay plugin to jsk_teleop_joy
  • use singleton class to maintain view point of rviz to have persistency across several plugins
  • show overlay menu on rviz to swtich plugins
  • support multiple instances per one plugin class
  • use diagnostic_updater package to generate diagnostic messages rather than publish diagnostic_msgs directly
  • optimize rviz animation smoother by joy stick controller
  • support jsk_teleop_joy in robot-controller-sample.launch of jsk_ik_server
  • publish the status of jsk_teleop_joy to /diagnostics. decrease the number of the messages if the joy stick type is failed to be estimated. publish the status of the estimation to /diagnostics
  • make interactive_midi_config available for hydro
  • fix midi_config_player for groovy
  • make midi_config_player available for hydro
  • add button to control interactive marker
  • transform PoseStamped when setting marker pose
  • add method to set pose
  • add method to change move arm
  • use triangle button to send menu
  • fix find -> find_module to detect catkin or rosbuild
  • add config for padcontrol
  • support groovy on all the plugins
  • use imp module to decide use load_manifest or not
  • send 'move' when circle button is pushed
  • add dependancy on jsk_interactive_marker
  • rename plugin scripts to avoid msg import bug
  • add import statement
  • use load_manifest on groovy
  • use load_manifest on groovy
  • add end effector controller interface
  • JoyFootstepPlanner: publish execute if circle button is pushed
  • JoyFootstepPlanner: reset goal pose if cross button is pushed
  • determines the initial position of goal according to the specified frame_id and offset for the legs
  • add tf_ext.py to jsk_teleop_joy. it's a set of utitlity function for tf
  • revert to use depend tag for view_controller_msgs
  • write about select button
  • write about how to implement plugin
  • write about how to export the plugins
  • update docs
  • use upper case for MIDI
  • add list of plugins
  • update docs
  • update docs
  • add link to each script
  • update some docs
  • add document about [midi_write.py]{.title-ref}
  • add movie of interactive configuretion of midi device
  • use english in README.md#interactive_midi_config.py
  • fix style of ordered list
  • #2: automatically detect the game controller type at joy_footstep.launch use type=auto parameter
  • #2: rename xbox.launch and xbox_footstep.launch to joy.launch and joy_footsetp.launch. it support many game controllers now and the name did not match the current state.
  • #2: detect ps3 wireless automatically
  • #2: use auto mode as default
  • #2: update document about ps3 bluetooth
  • mv jsk_joy/ jsk_teleop_joy/
  • rename jsk_joy -> jsk_telop_joy
  • fix to use rosdep
  • adding footstep planning demo plugin
  • updating the parameters
  • arg1 = topic name, arg2 = device name
  • fix topic name
  • install subdirectory into dist_package
  • auto detecting xbox/ps3wired
  • use joy_main as a wrapper of jsk_joy python library
  • not use roslib.load_manifest if the distro is hydro
  • installing launch file and so on
  • catkinized jsk_joy package
  • changed frame from base_link to odom
  • added JoyGoPos for plugin.xml
  • added gopos.py for teleoperation locomotion command
  • added gopos.launch for teleoperation locomotion command
  • sample launch for marker_6dof
  • tuned parameters to move camera
  • adding moveit plugin for controlling moveit from gaming controllers
  • launch file for pr2 moveit
  • adding README
  • adding configuration for launchpad mini
  • adding output configuration to QuNeo
  • supporting output of MIDI
  • adding script to test output of midi devices
  • mapping buttons automatically from axes
  • update midi configuration
  • script to verbose midi input
  • not printing input
  • adding nanokontrol2.yaml
  • updating configuration file
  • supporting 144/128 key event
  • adding config file for icontrols pro
  • adding scripts to configure midi device interactively
  • changing joy footstep planner plugin to use footstep marker in jsk_interactive_marker
  • adding interface to call footstep planning from game controllers
  • adding verbose plugin for debugging and support wired ps3 controller
  • add nanopad2_joy.py, touchpad and scene button supported
  • adding sample to run xbox footstep plugin
  • update orientation way to local
  • supporting local z movement acoording to orientation
  • adding manual footstep generator interface
  • updating parameters of view rotation
  • test pulibhs program for joystick, any joystick ok?
  • supports to toggle follow view mode
  • devided trackpoint joy publisher and status class to two files.
  • added nanopad_joy.py nanopad_status.py for KORG nanoPAD2
  • updating some parameters
  • supporting pitch and roll
  • implementing jsk_joy as plugin system
  • changed class name of nanokontrol status: NanoKONTROL2 -> NanoKONTROL2Status
  • add nanokontrol_status.py. convert data from Joy msg to nanoKONTROL class instance.
  • support touchpad; auto-detect device id
  • light turns on when button is pushed
  • added device link URL of vestax_spin2
  • added trackpoint_joy.py. publish thinkpad trackpoint status as Joy.
  • bugfix button type
  • set vestax_spin2.py execuable
  • chnaged button index of akailpd8. set for PROG1 PAD mode.
  • bugfix indent
  • added URL of device web page for lanchpad
  • add controller for vestax spin 2
  • added akaiLPD8.py
  • added device URL link for nanokontrol
  • add script to publish joy_message with launchpad mini
  • deleted debug outpu in nanokontrol_joy.py
  • add rosdep name=python
  • added nanokontrol_joy.py for publishing nanoKONTROL2 input as Joy.
  • update some parameters
  • update some parameters
  • using left analog to zoom in/out
  • introducing new package: jsk_joy
  • Contributors: Kei Okada, Masaki Murooka, Ryohei Ueda, Satoshi Iwaishi, Yuki Furuta, Yusuke Furuta, Shunichi Nozawa, Shintaro Noda, Youhei Kakiuchi

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Launch files

Messages

No message files found.

Services

No service files found

Plugins

Recent questions tagged jsk_teleop_joy at Robotics Stack Exchange