Exemple #1
0
 def __init__(self, name, args):
     JSKJoyPlugin.__init__(self, name, args)
     self.output_topic = self.getArg("output_topic", "output")
     self.org_topic = self.getArg("joy_original_topic", "/joy_org")
     self.joy_mux_srv_name = self.getArg("joy_mux", "mux")
     self.joy_mux_select_srv = rospy.ServiceProxy(
         self.joy_mux_srv_name + "/select", MuxSelect)
Exemple #2
0
 def __init__(self, name, args):
     JSKJoyPlugin.__init__(self, name, args)
     self.command_states = {
         "handle":
         HandleCommandState("handle", Float64, Float32,
                            "drive/controller/goal_handle_angle"),
         "accel":
         VehicleCommandState("accel", Float64, Float32,
                             "drive/controller/step"),
         "brake":
         VehicleCommandState("brake", Float64, None,
                             None),  # do not support brake synchronize
         "neck_y":
         VehicleCommandState("neck_y", Float64, Float32,
                             "drive/controller/neck_y_angle"),
         "neck_p":
         VehicleCommandState("neck_p", Float64, Float32,
                             "drive/controller/neck_p_angle")
     }
     self.synchronizeAllCommand()
     self.execute_flag = False
     print >> sys.stderr, "Joystick initialization is finished"
     self.initialize_service = rospy.Service('drive/operation/initialize',
                                             Empty,
                                             self.initializeServiceCallback)
     self.synchronize_service = rospy.Service(
         'drive/operation/synchronize', StringRequest,
         self.synchronizeServiceCallback)
     self.subscriber = rospy.Subscriber('drive/execute_flag', Bool,
                                        self.executeFlagCallback)
 def __init__(self, name, args):
   JSKJoyPlugin.__init__(self, name, args)
   self.control_view = self.getArg('control_view', True)
   if not self.control_view:
     rospy.loginfo("Not using rviz view control")
     RVizViewControllerManagerSingleton.camera_pub.unregister()
     RVizViewControllerManagerSingleton.camera_sub.unregister()
 def __init__(self, name, args):
     JSKJoyPlugin.__init__(self, name, args)
     self.control_view = self.getArg('control_view', True)
     if not self.control_view:
         rospy.loginfo("Not using rviz view control")
         RVizViewControllerManagerSingleton.camera_pub.unregister()
         RVizViewControllerManagerSingleton.camera_sub.unregister()
 def __init__(self, name, args):
   JSKJoyPlugin.__init__(self, name, args)
   self.cmd_vel = Twist()
   self.publish_cmd_vel = self.getArg('publish_cmd_vel', True)
   self.max_vel = self.getArg('max_vel', 0.2)
   self.max_omega = self.getArg('max_omega', 0.17) # 10[deg]
   self.orthogonal_axis_mode = self.getArg('orthogonal_axis_mode', True)
   self.prev_time = rospy.Time.now()
   if self.publish_cmd_vel:
     self.twist_pub = rospy.Publisher(self.getArg('cmd_vel', 'cmd_vel'), Twist, queue_size = 1)
Exemple #6
0
 def __init__(self, name, args):
   JSKJoyPlugin.__init__(self, name, args)
   self.pub = rospy.Publisher("/overlay_text", OverlayText)
   self.usage = self.getArg("text")
   self.width = self.getArg("width", 400)
   self.height = self.getArg("width", 600)
   self.left = self.getArg("left", 10)
   self.top = self.getArg("top", 10)
   self.line_width = self.getArg("line_width", 2)
   self.text_size = self.getArg("text_size", 20)
   self.font = self.getArg("font", "DejaVu Sans Mono")
 def __init__(self, name, args):
     JSKJoyPlugin.__init__(self, name, args)
     self.cmd_vel = Twist()
     self.publish_cmd_vel = self.getArg('publish_cmd_vel', True)
     self.max_vel = self.getArg('max_vel', 0.2)
     self.max_omega = self.getArg('max_omega', 0.17)  # 10[deg]
     self.orthogonal_axis_mode = self.getArg('orthogonal_axis_mode', True)
     self.prev_time = rospy.Time.now()
     if self.publish_cmd_vel:
         self.twist_pub = rospy.Publisher(self.getArg('cmd_vel', 'cmd_vel'),
                                          Twist,
                                          queue_size=1)
Exemple #8
0
 def __init__(self, name, args):
   JSKJoyPlugin.__init__(self, name, args)
   self.command_states = {
     "handle": HandleCommandState("handle", Float64, Float32, "drive/controller/goal_handle_angle"),
     "accel": VehicleCommandState("accel", Float64, Float32, "drive/controller/step"),
     "brake": VehicleCommandState("brake", Float64, None, None), # do not support brake synchronize
     "neck_y": VehicleCommandState("neck_y", Float64, Float32, "drive/controller/neck_y_angle"),
     "neck_p": VehicleCommandState("neck_p", Float64, Float32, "drive/controller/neck_p_angle")
     }
   self.synchronizeAllCommand()
   self.execute_flag = False
   print >> sys.stderr, "Joystick initialization is finished"
   self.initialize_service = rospy.Service('drive/operation/initialize', Empty, self.initializeServiceCallback)
   self.synchronize_service = rospy.Service('drive/operation/synchronize', StringRequest, self.synchronizeServiceCallback)
   self.subscriber = rospy.Subscriber('drive/execute_flag', Bool, self.executeFlagCallback)
 def __init__(self, name, args):
     JSKJoyPlugin.__init__(self, name, args)
     self.menu_pub = rospy.Publisher("/overlay_menu", OverlayMenu)
     self.menus = [
         ["Append Pre-defined Polygon", self.appendPreDefinedPolygon],
         ["Register Current GridMap", self.registerCurrentGridMap],
         ["Clear Environment", self.clearEnvironment],
         ["Exit", self.exit]]
     self.clear_maps_srv = rospy.ServiceProxy(
         self.getArg("clear_maps", "/env_server/clear_maps"), Empty)
     self.register_current_map_srv = rospy.ServiceProxy(
         self.getArg("register_current_map", "/env_server/register_to_hisotry"), Empty)
     self.register_completed_map_srv = rospy.ServiceProxy(
         self.getArg("register_completed_map", "/env_server/register_completion_to_hisotry"), Empty)
     self.current_index = 0
 def __init__(self, name, args):
     JSKJoyPlugin.__init__(self, name, args)
     self.menu_pub = rospy.Publisher("/overlay_menu", OverlayMenu)
     self.menus = [
         ["Append Pre-defined Polygon", self.appendPreDefinedPolygon],
         ["Register Current GridMap", self.registerCurrentGridMap],
         ["Clear Environment", self.clearEnvironment],
         ["Exit", self.exit],
     ]
     self.clear_maps_srv = rospy.ServiceProxy(self.getArg("clear_maps", "/env_server/clear_maps"), Empty)
     self.register_current_map_srv = rospy.ServiceProxy(
         self.getArg("register_current_map", "/env_server/register_to_hisotry"), Empty
     )
     self.register_completed_map_srv = rospy.ServiceProxy(
         self.getArg("register_completed_map", "/env_server/register_completion_to_hisotry"), Empty
     )
     self.current_index = 0
Exemple #11
0
 def __init__(self, name, args):
   JSKJoyPlugin.__init__(self, name, args)
   self.output_topic = self.getArg("output_topic", "output")
   self.org_topic = self.getArg("joy_original_topic", "/joy_org")
   self.joy_mux_srv_name = self.getArg("joy_mux", "mux")
   self.joy_mux_select_srv = rospy.ServiceProxy(self.joy_mux_srv_name + "/select" , MuxSelect)
Exemple #12
0
 def __init__(self, name, args):
   JSKJoyPlugin.__init__(self, name, args)
Exemple #13
0
 def __init__(self):
     JSKJoyPlugin.__init__(self, 'VerbosePlugin')
 def __init__(self, name, args):
   JSKJoyPlugin.__init__(self, name, args)
Exemple #15
0
 def __init__(self, name):
   JSKJoyPlugin.__init__(self, name)
   self.camera_pub = rospy.Publisher('/rviz/camera_placement', CameraPlacement)
   self.pre_view = CameraView()
   self.follow_view = rospy.get_param('~follow_view', False)
   self.counter = 0
Exemple #16
0
 def __init__(self, name, args):
   JSKJoyPlugin.__init__(self, name, args)
   self.output_topic = self.getArg("output_topic", "output")