radial_menu: radial_menu_backend | radial_menu_model | radial_menu_msgs | radial_menu_rviz

Package Summary

The radial_menu package

Radial menu on ROS1 for quick, accurate and intuitive selection by a joystick from 10+ items

screenshot

Usage

Subscribe both joy and menu state messages using message_filters::TimeSynchronizer, watch which menu items are selected and process the joy messages when the menu is disabled (i.e. the menu does not own the joy messages). See an example node graph below or example_teleop_node.cpp. The teleop_node in the graph can be replaced to your node.

example_node_graph

Meta Pkg: radial_menu

A meta-package depending radial_menu_backend, radial_menu_model, radial_menu_msgs and radial_menu_rviz

Pkg: radial_menu_backend

Nodelet: Backend

Updates radial menu state based on joystick input

Subscribed Topics

joy (sensor_msgs/Joy)
  • Joystick input

Published Topics

radial_menu_state (invalid message type for MsgLink(msg/type))
  • The stamp in a message is copied from the source joy message

Parameters

menu_description (string)
  • Tree structure of the menu in xml format (see the next section for details)
~allow_multi_selection (bool, default: false)
  • If false, current selected items will be deselected when a new item is selected
~reset_on_enabling (bool, default: false)
  • If true, current selected items will be deselected when enabling the menu
~reset_on_disabling (bool, default: false)
  • If true, current selected items will be deselected when disabling the menu
~auto_select (bool, default: false)
  • If true, the last pointed item will be autonomously selected. Disable the menu before unpoint not to select
~enable_button (int, default: 1)
  • Button to keep enabling the menu. PS4's circle button as default.
~select_button (int, default: 5)
  • Button to select or deselect an item or descend the menu. PS4's R1 button as default.
~ascend_button (int, default: 4)
  • Button to ascend the menu. PS4's L1 button as default,
~pointing_axis_v (int, default: 1)
  • Vertical axis to point an item. PS4's LEFT Y axis as default.
~pointing_axis_h (int, default: 0)
  • Horizontal axis to point an item. PS4's LEFT X axis as default.
~invert_pointing_axis_v (bool, default: false)
  • If true, invert the value of vertical pointing axis
~invert_pointing_axis_h (bool, default: false)
  • If true, invert the value of horizontal pointing axis
~pointing_axis_threshold (double, default: 0.5)
  • Threshold value of axis input to enable pointing

Example of the param menu_description

   1 <!-- A simple example -->
   2 
   3 <!-- An element must have the attribute 'name'.               -->
   4 <!-- The 'name' of the root element indicates the menu title. -->
   5 <item name="MoveCmd">
   6     <!-- An element can have child elements -->
   7     <item name="Front" />
   8     <item name="Left" />
   9     <item name="Back" />
  10     <item name="Right" />
  11 </item>
  12 
  13 <!-- Multiple root elements are not allowed -->

   1 <!-- A complex example -->
   2 
   3 <!-- An element can optionally have the attribute 'display'. -->
   4 <!-- Possible values are;                                    -->
   5 <!--   * 'name' (default): displays the item name            -->
   6 <!--   * 'alttxt': displays an alternative text              -->
   7 <!--   * 'image': displays an image                          -->
   8 <item name="Reboot" display="alttxt" alttxt="&#xF021;">
   9     <item name="Base" display="image" imgurl="package://radial_menu_resources/images/base.bmp">
  10         <item name="Wheels" display="image" imgurl="file://Photos/wheels.png" />
  11         <item name="Cameras">
  12             <item name="Front" />
  13             ...
  14         </item>
  15     </item>
  16     <item name="Arm">
  17         ...
  18     </item>
  19 </item>

Pkg: radial_menu_rviz

Rviz plugin: RadialMenu

Visualizes subscribed menu states as a radial menu when the menu is being enabled. Supports display types of items.

Rviz plugin: HorizontalMenu

Always visualizes subscribed menu states as a single-lined menu. Displays item names regardless of their display types.

Pkg: radial_menu_model

Contains an implementatin of menu tree model, which is commonly used in the backend and rviz packages

Pkg: radial_menu_msgs

Defines radial_menu_msgs/State

Pkg: radial_menu_examples

Provides a full example which requires a joystick and a Rviz frontend example which does not

Wiki: radial_menu (last edited 2020-08-08 07:28:21 by Yoshito Okada)