18 #include <geometry_msgs/Twist.h> 19 #include <sensor_msgs/Joy.h> 26 geometry_msgs::Twist vel;
31 else if (joy->buttons[1])
33 else if (joy->buttons[3])
55 else if (joy->buttons[9])
59 else if (joy->buttons[6])
63 else if (joy->buttons[7])
77 int main(
int argc,
char** argv)
79 ros::init(argc, argv,
"uos_diffdrive_teleop_wiimote");
87 vel_pub = nh.
advertise<geometry_msgs::Twist>(
"cmd_vel", 1);
void ps3joyCallback(const sensor_msgs::Joy::ConstPtr &joy)
void publish(const boost::shared_ptr< M > &message) const
Subscriber subscribe(const std::string &topic, uint32_t queue_size, void(T::*fp)(M), T *obj, const TransportHints &transport_hints=TransportHints())
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
int main(int argc, char **argv)
bool param(const std::string ¶m_name, T ¶m_val, const T &default_val) const
Publisher advertise(const std::string &topic, uint32_t queue_size, bool latch=false)
double max_rotational_vel