NOTE! All the book instructions make reference to turtlebot_xxx. We will be using turtlebot3_xxx
Intro
- We will modify the instructions from the book so follow along here!
- Code will be part of
cosi119_src
package which we have been using: cosi119_src
Red Light! Green Light!
$ cw
$ cd src/cosi119_src/samples/src
$ roslaunch turtlebot3_gazebo turtlebot3_world.launch
$ ./red_light_green_light.py
Reading Sensor Data
$ roslaunch turtlebot3_gazebo turtlebot3_world.launch
$ rostopic echo scan
Sensing and Actuation: Wander-bot!
$ roslaunch turtlebot3_gazebo turtlebot3_stage_3.launch
$ chmod +x wander.py
$ ./wander.py
Summary
- Logic in a
.py
program can establish behaviors
- It’s possible to modify an existing python program to be a ROS node
- Nodes can publish and subscribe, and do both at the same Time
- Need to know the exact names of the topics
- Simulator is used for an idealized context for testing