Exemplo n.º 1
0
    def markers_callback(self, msg):
        object_poses = dict()

        print("updating objects")
        for object in msg.objects:
            pose = GraspingHelper.getPoseStampedFromPoseWithCovariance(
                object.pose)
            object_poses[str(object.type.key)] = pose

        if rospy.Time.now() - self.time_exited > rospy.Duration(2.0):
            self.pick_and_place(msg.objects, object_poses)
            self.time_exited = rospy.Time.now()
Exemplo n.º 2
0
	def object_callback(self, msg):
		self.objects = []
		self.object_poses = dict()
		for object in msg.objects:
			self.objects.append(object.type.key)
			self.object_poses[object.type.key] = GraspingHelper.getPoseStampedFromPoseWithCovariance(object.pose)
		self.broadcast_transforms()

		if not self.is_annotating:
			self.is_annotating = True
			self.current_thread = Thread(None, self.annotate_grasps)
			self.current_thread.start()
Exemplo n.º 3
0
    def markers_callback(self, msg):
        object_poses = dict()

        if len(msg.objects) == 0:
            rospy.logerr("No objects identified")
            return

        for object in msg.objects:
            pose = GraspingHelper.getPoseStampedFromPoseWithCovariance(
                object.pose)
            object_poses[str(object.type.key)] = pose

        self.visualize_grasps(object_poses)
Exemplo n.º 4
0
    def markers_callback(self, msg):
        object_poses = dict()

        if len(msg.objects) == 0:
            rospy.logerr("No objects identified")
            return

        rospy.loginfo("updating objects")

        for object in msg.objects:
            pose = GraspingHelper.getPoseStampedFromPoseWithCovariance(
                object.pose)
            object_poses[str(object.type.key)] = pose

        if rospy.Time.now() - self.time_exited > rospy.Duration(10.0):
            self.pick_and_place(msg.objects, object_poses)
            self.time_exited = rospy.Time.now()
        rospy.loginfo("updating objects")
Exemplo n.º 5
0
    def markers_callback(self, msg):
        object_poses = dict()
        self.objects = ["kinect", "table", "tripod", "boundary1", "boundary2"]
        for object in self.objects:
            self.last_time_seen[object] = rospy.Time.now()
        if len(msg.objects) == 0:
            rospy.logerr("No objects identified")
            return

        for object in msg.objects:
            self.last_time_seen[object.type.key] = rospy.Time.now()
            pose = GraspingHelper.getPoseStampedFromPoseWithCovariance(
                object.pose)
            self.add_object_at_pose(str(object.type.key), pose)
            object_poses[str(object.type.key)] = pose
            self.objects.append(object.type.key)
            marker = MoveHelper.create_pose_marker(pose, object.type.key, 2,
                                                   15, (1, 0, 0, 1))
            self.markers_publisher.publish(marker)
Exemplo n.º 6
0
	def markers_callback(self, msg):
		self.object_poses = dict()
		
		for object in msg.objects:
			pose = GraspingHelper.getPoseStampedFromPoseWithCovariance(object.pose)
			self.object_poses[str(object.type.key)] = pose