ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
2013-01-29 14:21:05 -0500 | received badge | ● Famous Question (source) |
2012-12-05 23:14:10 -0500 | received badge | ● Notable Question (source) |
2012-12-05 02:35:07 -0500 | received badge | ● Popular Question (source) |
2012-12-04 23:56:34 -0500 | asked a question | Turtlebot not moving Hey guys, I'm still a beginner in ROS and I wrote a simple program in C++ that makes the turtlebot move in a square trajectory. I have the electric version of ROS installed. I used rosmake to compile the package and rosrun to run the executable file. The problem is, the turtlebot is not moving or anything. I tried to use a printf to see if the code was working and it did. I also tried to use the teleop package and it worked too. So I don't know what else I can do to make it work. Some help with that would be much appreciated :] Here is the code I used: int main(int argc, char** argv) { // ROS initialisation ros::init(argc, argv, "turtle_motion"); ros::NodeHandle n; ros::Publisher vel_pub = n.advertise<geometry_msgs::twist>("/turtlebot_node/cmd_vel", 1); ros::Rate loop_rate(5); unsigned int cpt=0; while(ros::ok()) { } return(0); } |