3 from jsk_teleop_joy.joy_pose_6d
import JoyPose6D
4 from std_msgs.msg
import String, Empty
5 from geometry_msgs.msg
import PoseStamped
6 import xml.etree.ElementTree
as ET
7 from jsk_interactive_marker.msg
import MarkerMenu
8 from jsk_rviz_plugins.msg
import OverlayMenu
15 JoyPose6D.__init__(self, name, args)
17 self.
frame_id = self.getArg(
'frame_id',
'base_link')
21 self.
menu_pub = rospy.Publisher(
"/overlay_menu", OverlayMenu)
23 'close hand',
'open hand',
'toggle ik rotation']
28 menu.menus = self.
menus
29 menu.current_index = index
30 menu.title =
"JSK teleop menu"
32 menu.action = OverlayMenu.ACTION_CLOSE
35 menu_msg = MarkerMenu()
38 def joyCB(self, status, history):
39 if history.length() > 0:
40 latest = history.latest()
45 if history.new(status,
"triangle")
or history.new(status,
"cross"):
48 elif history.new(status,
"up")
or history.new(status,
"left_analog_up"):
53 elif history.new(status,
"down")
or history.new(status,
"left_analog_down"):
58 elif history.new(status,
"circle"):
76 if history.new(status,
"triangle"):
78 elif history.new(status,
"circle"):
80 elif history.new(status,
"start"):
82 elif history.new(status,
"select"):
85 JoyPose6D.joyCB(self, status, history)