class Post: topic = Topic("", None, None) user = User("", "", "") postDate = "" content = "" def __init__(self, postDate, content, topic, user): self.topic = topic self.user = user self.postDate = postDate self.content = content @staticmethod def creationPost(content, idTopic, idUser): return bdd.creationPost(content, idTopic, idUser) @staticmethod def listePost(idTopic): return bdd.listePost(idTopic) @staticmethod def suppressionPost(idPost): return bdd.suppressionPost(idPost) @staticmethod def miseAjourPost(idPost, content): return bdd.miseAjourPost(idPost, content)
def step_impl(context): # Setup environment # Setup Topic object context.pose = Topic(u"/odometry/base_raw/pose") # Begin capture of Topic Echo for 10 lines context.starting_echo = context.pose.echo(10) # Map return value from echo to object of type msgs/nav_msgs/Odometry starting_position = Odometry(context.starting_echo) # Store starting position to shared context context.starting_position = starting_position
print("Класс",klass1.get_number_today(), klass1.get_letter()) print(klass1) print("----------------------------------------------------------------------") """----------------------------------------------------------------------""" """Учителя""" teacher1 = Teacher(first_name="Иванова", second_name="Мария", patronymic="Петровна") teacher2 = Teacher(first_name="Гунёва", second_name="Раисия", patronymic="Петровна") """----------------------------------------------------------------------""" """Предметы""" subject1 = Subject(item_name="Математика", teacher=teacher1) subject2 = Subject(item_name="Биология", teacher=teacher2) """----------------------------------------------------------------------""" """Темы занятий""" topic1 = Topic(name_topic="Дроби") topic2 = Topic(name_topic="Рациональные числа") topic3 = Topic(name_topic="Анатомия человека") topic4 = Topic(name_topic="Физиология человека") """----------------------------------------------------------------------""" """Изучается""" studying1 = Studying(hour=2, klas=klass1, syllabus=syllabus1, subject=subject1, teacher=teacher1) sub_topic = Subtheme(studying=studying1, topic=topic1) sub_topic1 = Subtheme(studying=studying1, topic=topic2) sub_topic2 = Subtheme(studying=studying1, topic=topic3) sub_topic3 = Subtheme(studying=studying1, topic=topic4) studying1.get_sub_themes().extend([sub_topic, sub_topic1, sub_topic2, sub_topic3]) print(studying1) print("----------------------------------------------------------------------") """----------------------------------------------------------------------"""
def step_impl(context, velocity_command, orientation_command): context.cmd_vel = Topic(u"/twist_mux/cmd_vel") # Publish supplied command to the topic and watch for feedback marker context.cmd_vel.rostopic_pub(u"geometry_msgs/Twist", velocity_command, orientation_command, u"publishing and latching message.")