ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Make the turtle move faster

asked 2018-05-29 01:30:40 -0600

updated 2018-05-29 02:31:16 -0600

I am running the draw_square.cpp node from the turtlesim/tutorials package. The emulated turtle moves as expected.

Question: How can I change the source code in draw_square.cpp to make the turtle move faster?


edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-05-29 05:04:42 -0600

nathan gravatar image

The callback function commandTurtle (source code) publishes the twist message, which defines the linear and angular velocity of the turtle.

The interface of the functions looks like void commandTurtle(ros::Publisher twist_pub, float linear, float angular). The float linear argument defines the forward velocity of the turtle.

Therefore, try changing the argument passed to the commandTurtle function when the void forward (source code)

edit flag offensive delete link more

Question Tools



Asked: 2018-05-29 01:30:40 -0600

Seen: 712 times

Last updated: May 29 '18