37 pacmod_msgs::PositionWithSpeed steer_msg;
40 float speed_scale = 1.0;
41 bool speed_valid =
false;
42 float current_speed = 0.0;
57 steer_msg.angular_position = (range_scale *
max_rot_rad) * msg->axes[
axes[steering_axis]];
64 pacmod_msgs::PacmodCmd turn_signal_cmd_pub_msg;
76 if(msg->axes[2] < -0.5)
101 pacmod_msgs::PacmodCmd shift_cmd_pub_msg;
109 pacmod_msgs::PacmodCmd shift_cmd_pub_msg;
117 pacmod_msgs::PacmodCmd shift_cmd_pub_msg;
125 pacmod_msgs::PacmodCmd shift_cmd_pub_msg;
133 pacmod_msgs::PacmodCmd accelerator_cmd_pub_msg;
161 accelerator_cmd_pub_msg.f64_cmd = 0;
179 accelerator_cmd_pub_msg.f64_cmd = 0;
188 pacmod_msgs::PacmodCmd brake_msg;
202 brake_msg.f64_cmd = 0;
212 brake_msg.f64_cmd = 0;
234 pacmod_msgs::PacmodCmd headlight_cmd_pub_msg;
240 pacmod_msgs::PacmodCmd horn_cmd_pub_msg;
243 horn_cmd_pub_msg.ui16_cmd = 1;
245 horn_cmd_pub_msg.ui16_cmd = 0;
261 pacmod_msgs::PacmodCmd wiper_cmd_pub_msg;
static GamepadType controller
static const float ROT_RANGE_SCALER_LB
static double steering_max_speed
void publish(const boost::shared_ptr< M > &message) const
static pacmod_msgs::VehicleSpeedRpt::ConstPtr last_speed_rpt
void publish_shifting_message(const sensor_msgs::Joy::ConstPtr &msg)
Subscriber subscribe(const std::string &topic, uint32_t queue_size, void(T::*fp)(M), T *obj, const TransportHints &transport_hints=TransportHints())
ros::Publisher headlight_cmd_pub
static const float AXES_MIN
static const float AXES_MAX
static int headlight_state
static std::mutex speed_mutex
static const float ACCEL_OFFSET
static const uint16_t BUTTON_DOWN
static void callback_pacmod_enable(const std_msgs::Bool::ConstPtr &msg)
ros::Subscriber enable_sub
static JoyAxis steering_axis
static const float STEER_OFFSET
static std::unordered_map< JoyButton, int, EnumHash > btns
ros::Publisher steering_set_position_with_speed_limit_pub
static double brake_scale_val
static const float ACCEL_SCALE_FACTOR
std::vector< float > last_axes
static const uint16_t WIPER_STATE_START_VALUE
static double accel_scale_val
ros::Publisher accelerator_cmd_pub
Publisher advertise(const std::string &topic, uint32_t queue_size, bool latch=false)
void publish_steering_message(const sensor_msgs::Joy::ConstPtr &msg)
ros::Publisher brake_set_position_pub
static double max_veh_speed
ros::Publisher turn_signal_cmd_pub
ros::Publisher wiper_cmd_pub
void publish_accelerator_message(const sensor_msgs::Joy::ConstPtr &msg)
void publish_lights_horn_wipers_message(const sensor_msgs::Joy::ConstPtr &msg)
ros::Publisher shift_cmd_pub
static const uint16_t HEADLIGHT_STATE_START_VALUE
static const uint16_t NUM_HEADLIGHT_STATES
void publish_brake_message(const sensor_msgs::Joy::ConstPtr &msg)
static std::unordered_map< JoyAxis, int, EnumHash > axes
PublishControlBoardRev2()
ros::Publisher horn_cmd_pub
static const float STEER_SCALE_FACTOR
void publish_turn_signal_message(const sensor_msgs::Joy::ConstPtr &msg)
static const uint16_t NUM_WIPER_STATES