title: ROS programming: move forward turtlebot
body: <p>I want to move the turtlebot.</p>
  
  <p>Firstly i created package inside my catkin_ws</p>
  
  <pre><code>$ catkin_create_pkg /..package_name../ std_msgs rospy roscpp actionlib tf geometry_msgs move_base_msgs
  </code></pre>
  
  <p>Then i edit CMakeList</p>
  
  <pre><code>add_executable(myProgram src/main.cpp) and target_link_libraries(&lt;executabletargetname&gt;, ${catkin_LIBRARIES})
  </code></pre>
  
  <p>Thirdly, i run this command:</p>
  
  <pre><code>catkin_make
  </code></pre>
  
  <p>after compile:</p>
  
  <blockquote>
    <p>[100%] Building CXX object ileri/CMakeFiles/gg.dir/src/gg.cpp.o
    /home/turtlebot/catkin_ws/src/ileri/src/gg.cpp:18:2: error: ‘p’ does
    not name a type /home/turtlebot/catkin_ws/src/ileri/src/gg.cpp:28:2:
    error: expected unqualified-id before ‘try’
    /home/turtlebot/catkin_ws/src/ileri/src/gg.cpp:31:3: error: expected
    unqualified-id before ‘catch’ make[2]: *
    [ileri/CMakeFiles/gg.dir/src/gg.cpp.o] Error 1 make[1]: *
    [ileri/CMakeFiles/gg.dir/all] Error 2</p>
  </blockquote>
  
  <p><strong>.cpp :</strong></p>
  
  <pre><code>`geometry_msgs::PointStamped p;
   geometry_msgs::PointStamped p1;
   p.header.stamp = ros::Time();
   std::string frame1 = "/camera_depth_optical_frame";
   p.header.frame_id = frame1.c_str();
  
   p.point.x = 0;
   p.point.y = 0;
   p.point.z = 1; // 1 meter
  
   std::string frame = "map";
  
   try
   {
     listener.transformPoint(frame,p,p1);
   }catch(tf::TransformException&amp; ex) { ROS_ERROR("exception while transforming..."); }
  
   // create message for move_base_simple/goal 
   geometry_msgs::PoseStamped msg;
   msg.header.stamp = ros::Time();
   std::string frame = "/map";
   msg.header.frame_id = frame.c_str();
   msg.pose.position = p1.point;
   msg.pose.orientation = tf::createQuaternionMsgFromYaw(0.0);
   publisher.publish(msg);`
  </code></pre>
  
  <ul>
  <li>What do you think about these errors?</li>
  <li>Are there problems about include? If you think so, which includes should i add this code?</li>
  </ul>