Skip to content

auman66/live_code_interview

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is a repo with a live coding demo of ROS using the turtlesim and turtlebot gazebo simulation.

The live coding will take place in the move.py file. The ex_move_bot.py and ex_move_turtle.py files are completed examples.

Prerequisites

Set Up

  1. Install turlebot sim:
$ cd ~/catkin_ws/source
$ git clone -b noetic-devel https://github.com/ROBOTIS-GIT/turtlebot3_simulations.git
  1. Follow tutorial for Installing and Configuring Your ROS Environment

  2. Create Package (see Creating a ROS Package tutorial):

$ catkin_create_pkg live_code std_msgs rospy roscpp geometry_msgs rostime
  1. Add scripts folder
$ mkdir live_code/scripts
  1. Create file named move.py in scripts folder

  2. Add move.py to cmake by uncommenting lines and adding:

catkin_install_python(PROGRAMS
  scripts/move.py
  DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
  1. Build
$ cd ~/catkin_ws
$ catkin build
  1. Source
$ source devel/setup.bash

Note: Adding source ~/catkin_ws/devel/setup.bash to your ~/.bashrc file is a good shortcut for this

Running the system

Make sure roscore is running

Running turtlesim

$ rosrun turtlesim turtlesim_node
$ rosrun live_code ex_move_turtle.py

Running turtlebot simulation

$ export TURTLEBOT3_MODEL=burger
$ roslaunch turtlebot3_gazebo turtlebot3_house.launch
$ rosrun live_code ex_move_bot.py

Note: export TURTLEBOT3_MODEL=burger can be added to the ~/.bashrc file

Sources:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors