Logo

Turtlesim

1 min read
Lesson slides
1 / 7

ROS - Lesson 2

Turtlesim

Exploring the ROS master, node, and topic model with the Turtlesim simulator

ROS

  • Eco System - Turtlesim

mmabas77@mmabas77-ROS:~$ roscore

  • rosout logging node
  • ROS Parameter Server
  • ROS Master
  • roscore will start up:
  • Roscore is a collection of nodes and programs that are pre-requisites of a ROS-based system. You must have a roscore running in order for ROS nodes to communicate. It is launched using the roscore command.
  • The ROS master coordinates the communication between the different ROS nodes (processes). Each ROS node registers with the ROS master at start-up. The ROS master can/should be started via the command.
  • The roscore command starts ROS and creates the Master so that ROS nodes can communicate.

mmabas77@mmabas77-ROS:~$ rosrun turtlesim turtlesim_node

  • mmabas77@mmabas77-ROS:~$ rosservice call /turtle1/teleport_relative 1 0
  • mmabas77@mmabas77-ROS:~$ rosservice call /turtle1/teleport_absolute 1 1 0
  • mmabas77@mmabas77-ROS:~$ rosnode info /turtlesim
  • mmabas77@mmabas77-ROS:~$ rosnode list
  • The node creates the screen image and the turtle.

mmabas77@mmabas77-ROS:~$ rosrun turtlesim turtle_teleop_key

  • mmabas77@mmabas77-ROS:~$ rostopic echo /turtle1/pose
  • mmabas77@mmabas77-ROS:~$ rostopic list
  • mmabas77@mmabas77-ROS:~$ rqt_graph

Thanks

  • Eco System - Turtlesim