Marcelo-TurtleBot

From robotica.unileon.es
Jump to navigation Jump to search
  • Project Name: Navigation for the Turtlebot using ROS
  • Author: Marcelo de Souza
  • Email Addres: bsi.marcelo@gmail.com
  • Academic Year: 2012-2013
  • Degree: Undergraduate
  • Tags: ROS, navigation, turtlebot
  • Technologies: Turtlebot, ROS, MYRA
  • Status: Finished



In this project, we will study some algorithms and behaviors of autonomous movement of theTurtlebot robot, implemented on the ROS platform. After analyzing and experiencing the algorithms used to the handling and studiy its operation, an optimization is proposed. This improvement is to use artificial intelligence (specifically fuzzy logic) to provide the robot more accurate reasoning.



Preliminar steps

Environment Configuration

The structure to operate with Turtlebot/ROS is quite simple, consisting of a computer workstation and a computer robot, which is coupled to the platform Turtlebot. Both computers must communicate in order to perform the desired directions. It is necessary to install the system and ROS previous configuration of these two computers. The Turtlebot netbook comes with the ROS system installed and ready for configuration. Therefore, is necessary to install ROS on the computer workstation and configure them. These steps can be found on this group, on the project Fernando-TFM-ROS02.

Summary of usually commands

Connect to the PC-robot <syntaxhighlight lang=Bash>ssh turtlebot@IP_OF_PCROBOT</syntaxhighlight>
Start/stop the turtlebot service <syntaxhighlight lang=Bash>sudo service turtlebot start/stop</syntaxhighlight>
Execute the Turtlebot Dashboard <syntaxhighlight lang=Bash>rosrun turtlebot_dashboard turtlebot_dashboard&</syntaxhighlight>
Creating a package <syntaxhighlight lang=Bash>roscreate-pkg PACKAGE_NAME std_msgs turtlebot_node geometry_msgs nav_msgs sensor_msgs image_transport roscpp</syntaxhighlight>
Compiling the created package <syntaxhighlight lang=Bash>rosmake PACKAGE_NAME</syntaxhighlight>
To compile a program (add in CMakeList.txt) <syntaxhighlight lang=Bash>rosbuild_add_executable(PROGRAM_NAME src/PROGRAM_NAME.cpp)</syntaxhighlight>
Compile the programs added on CMakeList.txt <syntaxhighlight lang=Bash>make</syntaxhighlight>
Starting the Gazebo simulator <syntaxhighlight lang=Bash>roslaunch turtlebot_gazebo turtlebot_empty_world.launch</syntaxhighlight>
Executing a program <syntaxhighlight lang=Bash>rosrun PACKAGE_NAME PROGRAM_NAME</syntaxhighlight>
Copying a program from PC-Workstation to PC-Robot <syntaxhighlight lang=Bash>scp PROGRAM_NAME.cpp turtlebot@IP_OF_TURTLEBOT:/home/turtlebot/ros_workspace/PACKAGE_NAME/src/PROGRAM_NAME.cpp</syntaxhighlight>
Starting the Teleoperator <syntaxhighlight lang=Bash>roslaunch turtlebot_teleop keyboard_teleop.launch</syntaxhighlight>
Starting the RVIZ software <syntaxhighlight lang=Bash>rosrun rviz rviz -d `rospack find turtlebot_navigation`/nav_rviz.vcg</syntaxhighlight>

File: .bashrc - content

<syntaxhighlight lang=Bash> [...]

  1. enable programmable completion features (you don't need to enable
  2. this, if it's already enabled in /etc/bash.bashrc and /etc/profile
  3. sources /etc/bash.bashrc).

if [ -f /etc/bash_completion ] && ! shopt -oq posix; then

   . /etc/bash_completion

fi

source /opt/ros/fuerte/setup.bash

  1. source /home/user/setup.sh

ROS_WORKSPACE=~/ros_workspace ROS_PACKAGE_PATH=~/ros:/home/user/ros_workspace:/opt/ros/fuerte/stacks:/opt/ros/fuerte/share:/opt/ros/fuerte/stacks export ROS_MASTER_URI=http://IP_OF_PCROBOT:11311 export ROS_HOSTNAME=IP_OF_PCWORKSTATION </syntaxhighlight>