32 int main(
int argc,
char** argv) {
48 std::string cmd_vel_topic, e_stop_pub_topic, joy_topic, e_stop_sub_topic;
50 nh.
param<std::string>(
"cmd_vel_topic", cmd_vel_topic,
"joy/cmd_vel");
51 nh.
param<std::string>(
"e_stop_pub_topic", e_stop_pub_topic,
"/e_stop_sw_enable");
53 nh.
param<std::string>(
"joy_topic", joy_topic,
"/joy");
60 ROS_INFO(
"Enable e-stop: %d", enable_e_stop);
ros::Subscriber joy_subscriber
void joy_callback(const sensor_msgs::Joy::ConstPtr &joy)
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)
bool param(const std::string ¶m_name, T ¶m_val, const T &default_val) const
int main(int argc, char **argv)
Publisher advertise(const std::string &topic, uint32_t queue_size, bool latch=false)
ros::Publisher cmd_vel_pub
geometry_msgs::Twist cmd_to_send
ros::Publisher e_stop_pub
ROSCPP_DECL void spinOnce()