Quantcast
Channel: ROS Answers: Open Source Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 1516

Troubles to move turtlebot_gazebo

$
0
0
I started a small project where I wanted to move the turtlebot in gazebo. I launched: roslaunch turtlebot_gazebo turtlebot_world.launch I wrote a code to move it: #include "ros/ros.h" #include "geometry_msgs/TwistWithCovariance.h" #include "nav_msgs/Odometry.h" #include "gazebo_msgs/LinkState.h" #include "geometry_msgs/Twist.h" int main(int argc, char **argv){ ros::init(argc,argv,"move"); ros::NodeHandle n; ros::Publisher move_pub = n.advertise("moving",1000); ros::Rate loop_rate(10); geometry_msgs::Twist msg; while(ros::ok()){ msg.linear.x = 0.0; msg.linear.y = 0.0; msg.linear.z = 20.0; move_pub.publish(msg); ros::spinOnce(); loop_rate.sleep(); } } This doesn't work. As you can see i included other msgs and tried it with them but I got the same result. I also tried to find the node turtlebot_teleop_keyboard to find out how it is done by inputs. But i couldn't find the path to it. So what do I have to do to move it? And how can I find the path to the node? Thank you in advance

Viewing all articles
Browse latest Browse all 1516

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>