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

Make the turtle move faster

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

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

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?

turtlesim/draw_square

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

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

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

2 followers

Stats

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

Seen: 725 times

Last updated: May 29 '18