Ejemplo n.º 1
0
    def start_cb(self, req):

        # Run manipulation tasks
        if self.run():
            return None_BoolResponse(True)
        else:
            return None_BoolResponse(False)
 def autobed_occ_cb(self, req):
     print "Autobed Data Sampled"
     total_weight = np.sum(np.asarray(self.pressure_map))
     print "Total Weight on the mat:{}".format(total_weight)
     if total_weight >= 2000:
         return None_BoolResponse(True)
     else:
         return None_BoolResponse(False)
    def mech_anal_en_cb(self, req):

        # Run analyse tasks
        if req.data is True:
            self.mech_anal_flag = True
        else:
            self.mech_anal_flag = False

        return None_BoolResponse(True)
Ejemplo n.º 4
0
    def initArmsCallback(self, req):

        self.haptic('enabled')

        l_joint_state = [
            1.7013504719569787, -0.2846619162464899, 1.0247881430005377,
            -1.0400059974175215, 0.7408476425758285, -0.9261340129014745,
            -0.8541080908968821
        ]
        r_joint_state = [
            -1.3805018627854437, -0.3065720013305438, -0.6643104933210333,
            -1.6377642647201074, -0.014866701346294675, -0.9982517431192833,
            2.579269529149009
        ]

        print "Initializing both arm configurations!!"
        self.setPostureGoal(l_joint_state, arm='l')
        self.setPostureGoal(r_joint_state, arm='r')

        rospy.sleep(10.0)
        return None_BoolResponse(True)
Ejemplo n.º 5
0
 def scoopingStepsTimesCallback(self, data):
     self.scooping_steps_times.append(rospy.get_time() - self.init_time)
     return None_BoolResponse(True)