Skip to content

Latest commit

 

History

History

lab1

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Lab 1

Filozofia ROS'a i podstawowe koncepty

Slajdy z prezentacji

Do pobrania tutaj.

Środowisko

Nowy pusty ROSject na platformie The Construct, z uruchomioną symulacją Turtlebot 3.

Pojęcia

Część teoretyczna:

Część praktyczna:

  • Workspace
  • Catkin
  • Package
  • Node
  • Master
  • Topic
    • Message
    • rostopic
    • example publisher
        #!/usr/bin/env python3
        import rospy
        from std_msgs.msg import String
      
        rospy.init_node("publisher")
        publisher = rospy.Publisher("/hello_world", String, queue_size=10)
        r = rospy.Rate(10)
        while not rospy.is_shutdown():
          publisher.publish("Hello World")
          r.sleep()
    • example subscriber
        #!/usr/bin/env python3
        import rospy
        from std_msgs.msg import String
      
        def callback(msg):
          print(msg)
      
        rospy.init_node("subscriber")
        subscriber = rospy.Subscriber("/hello_world", String, callback)
        rospy.spin()

Skrypty

W katalogu /scripts.