#include <ros/ros.h>#include <std_srvs/Empty.h>#include <geometry_msgs/Twist.h>#include <demodoc/Changerate.h>
Go to the source code of this file.
Functions | |
| bool | changeRate (demodoc::Changerate::Request &req, demodoc::Changerate::Response &resp) |
| changeRate is a sevice that allows you to change the rate at which the node is publishing the commanded velocities to the turtle. More... | |
| int | main (int argc, char **argv) |
| The main function creates the node that: a) publishes commanded velocities of type <geometry_msgs::Twist> to the topic "turtle1/cmd_vel". b) offers a service to change the publishing rate c) offers a service to toggle between translational and rotational velocity. More... | |
| bool | toggleForward (std_srvs::Empty::Request &req, std_srvs::Empty::Response &resp) |
| toggleForward is a sevice that allows you to toggle between translational and rotational velocities to be published. More... | |
Variables | |
| bool | forward = true |
| double | newfrequency |
| bool | ratechanged = false |
| bool changeRate | ( | demodoc::Changerate::Request & | req, |
| demodoc::Changerate::Response & | resp | ||
| ) |
changeRate is a sevice that allows you to change the rate at which the node is publishing the commanded velocities to the turtle.
Its arguments are the following:
| req | This is the request argument. |
| resp | This is the response argument. |
Definition at line 36 of file pubvel_toggle_plus.cpp.
| int main | ( | int | argc, |
| char ** | argv | ||
| ) |
The main function creates the node that: a) publishes commanded velocities of type <geometry_msgs::Twist> to the topic "turtle1/cmd_vel". b) offers a service to change the publishing rate c) offers a service to toggle between translational and rotational velocity.
No parameters are used.
Definition at line 55 of file pubvel_toggle_plus.cpp.
| bool toggleForward | ( | std_srvs::Empty::Request & | req, |
| std_srvs::Empty::Response & | resp | ||
| ) |
toggleForward is a sevice that allows you to toggle between translational and rotational velocities to be published.
Its arguments are the following:
| req | This is the request argument. No request argument is needed so it is of type empty std_srvs::Empty |
| resp | This is the response argument. No request argument is needed so it is of type empty std_srvs::Empty |
Definition at line 20 of file pubvel_toggle_plus.cpp.
| bool forward = true |
Definition at line 8 of file pubvel_toggle_plus.cpp.
| double newfrequency |
Definition at line 9 of file pubvel_toggle_plus.cpp.
| bool ratechanged = false |
Definition at line 10 of file pubvel_toggle_plus.cpp.