17 #include "sensor_msgs/Joy.h" 22 inline void moveRobot(
const sensor_msgs::Joy &joy_msg) {
33 lp =
MAX_SPEED * (joy_msg.axes[3] + joy_msg.axes[2]);
34 rp =
MAX_SPEED * (joy_msg.axes[3] - joy_msg.axes[2]);
37 lp = (abs(lp) > 10) ? lp : 0;
38 rp = (abs(rp) > 10) ? rp : 0;
61 taskCreate(&
begin, TASK_DEFAULT_STACK_SIZE, NULL, TASK_PRIORITY_HIGHEST);
Subscriber subscribe(const std::string &topic, uint32_t queue_size, void(T::*fp)(M), T *obj, const TransportHints &transport_hints=TransportHints())
void moveRobot(const sensor_msgs::Joy &joy_msg)