コード例 #1
0
ファイル: minigame_time.py プロジェクト: igakilab/RoSexamples
 def __init__(self,scr): #constructor
     self.scr = scr #for curses
     self.bumper_sub = rospy.Subscriber("mobile_base/events/bumper", BumperEvent, self.bumper_cb)
     self.power_cmd_pub = rospy.Publisher("mobile_base/commands/motor_power", MotorPower,queue_size=10)
     self.vel_cmd_pub = rospy.Publisher("mobile_base/commands/velocity",Twist,queue_size=10)
     self.vel_cmd = Twist()
     self.bridge = CvBridge()
     self.image_sub = rospy.Subscriber("/cv_camera/image_raw",Image,self.image_cb)
     self.image_pub = rospy.Publisher("/image_converter/output_video",Image, queue_size=10)
     self.status = ks.KobukiStatus()
コード例 #2
0
 def __init__(self, scr):  #constructor
     self.scr = scr  #for curses
     self.bumper_sub = rospy.Subscriber("mobile_base/events/bumper",
                                        BumperEvent, self.bumper_cb)
     self.power_cmd_pub = rospy.Publisher(
         "mobile_base/commands/motor_power", MotorPower, queue_size=10)
     self.vel_cmd_pub = rospy.Publisher("mobile_base/commands/velocity",
                                        Twist,
                                        queue_size=10)
     self.vel_cmd = Twist()
     self.status = ks.KobukiStatus()
コード例 #3
0
    def __init__(self, scr):
        self.frame = 0
        self.scr = scr
        self.bumper_sub = rospy.Subscriber("mobile_base/events/bumper",
                                           BumperEvent, self.bumper_cb)
        self.power_cmd_pub = rospy.Publisher(
            "mobile_base/commands/motor_power", MotorPower, queue_size=10)
        self.vel_cmd_pub = rospy.Publisher("mobile_base/commands/velocity",
                                           Twist,
                                           queue_size=10)
        self.vel_cmd = Twist()
        self.odm_reset_pub = rospy.Publisher(
            "mobile_base/commands/reset_odometry", Empty, queue_size=10)
        self.odom_sub = rospy.Subscriber("odom", Odometry, self.odom_cb)

        self.bridge = CvBridge()
        self.image_sub = rospy.Subscriber("/cv_camera/image_raw", Image,
                                          self.image_cb)
        self.image_pub = rospy.Publisher("/image_converter/output_video",
                                         Image,
                                         queue_size=10)
        self.status = ks.KobukiStatus()