41 #include <can_msgs/Frame.h> 43 #include <dbw_mkz_msgs/BrakeCmd.h> 44 #include <dbw_mkz_msgs/BrakeReport.h> 45 #include <dbw_mkz_msgs/ThrottleCmd.h> 46 #include <dbw_mkz_msgs/ThrottleReport.h> 47 #include <dbw_mkz_msgs/SteeringCmd.h> 48 #include <dbw_mkz_msgs/SteeringReport.h> 49 #include <dbw_mkz_msgs/GearCmd.h> 50 #include <dbw_mkz_msgs/GearReport.h> 51 #include <dbw_mkz_msgs/TurnSignalCmd.h> 52 #include <dbw_mkz_msgs/Misc1Report.h> 53 #include <dbw_mkz_msgs/WheelPositionReport.h> 54 #include <dbw_mkz_msgs/WheelSpeedReport.h> 55 #include <dbw_mkz_msgs/FuelLevelReport.h> 56 #include <dbw_mkz_msgs/TirePressureReport.h> 57 #include <dbw_mkz_msgs/SurroundReport.h> 58 #include <dbw_mkz_msgs/BrakeInfoReport.h> 59 #include <dbw_mkz_msgs/ThrottleInfoReport.h> 60 #include <dbw_mkz_msgs/DriverAssistReport.h> 61 #include <sensor_msgs/Imu.h> 62 #include <sensor_msgs/NavSatFix.h> 63 #include <sensor_msgs/TimeReference.h> 64 #include <sensor_msgs/JointState.h> 65 #include <sensor_msgs/PointCloud2.h> 66 #include <geometry_msgs/TwistStamped.h> 67 #include <std_msgs/Empty.h> 68 #include <std_msgs/Bool.h> 69 #include <std_msgs/String.h> 85 void recvEnable(
const std_msgs::Empty::ConstPtr& msg);
86 void recvDisable(
const std_msgs::Empty::ConstPtr& msg);
87 void recvCAN(
const can_msgs::Frame::ConstPtr& msg);
88 void recvCanImu(
const std::vector<can_msgs::Frame::ConstPtr> &msgs);
89 void recvCanGps(
const std::vector<can_msgs::Frame::ConstPtr> &msgs);
90 void recvBrakeCmd(
const dbw_mkz_msgs::BrakeCmd::ConstPtr& msg);
93 void recvGearCmd(
const dbw_mkz_msgs::GearCmd::ConstPtr& msg);
117 inline bool fault() {
return fault_brakes_ || fault_throttle_ || fault_steering_ || fault_steering_cal_ ||
fault_watchdog_; }
118 inline bool override() {
return override_brake_ || override_throttle_ || override_steering_ ||
override_gear_; }
119 inline bool clear() {
return enable_ &&
override(); }
149 void publishJointStates(
const ros::Time &stamp,
const dbw_mkz_msgs::WheelSpeedReport *wheels,
const dbw_mkz_msgs::SteeringReport *steering);
152 template <
typename T>
static int sgn(T val) {
153 return ((T)0 < val) - (val < (T)0);
232 #endif // _DBW_NODE_H_
void recvSteeringCmd(const dbw_mkz_msgs::SteeringCmd::ConstPtr &msg)
ros::Publisher pub_wheel_positions_
void overrideBrake(bool override, bool timeout)
ros::Publisher pub_joint_states_
ros::Publisher pub_sys_enable_
void recvDisable(const std_msgs::Empty::ConstPtr &msg)
ros::Subscriber sub_throttle_
bool fault_watchdog_using_brakes_
void faultSteering(bool fault)
ros::Subscriber sub_enable_
void overrideThrottle(bool override, bool timeout)
ros::Subscriber sub_disable_
ros::Subscriber sub_gear_
void faultSteeringCal(bool fault)
ros::Publisher pub_steering_
void timeoutThrottle(bool timeout, bool enabled)
ros::Publisher pub_gps_vel_
void timeoutBrake(bool timeout, bool enabled)
ros::Publisher pub_driver_assist_
void faultBrakes(bool fault)
std::map< uint8_t, std::string > bdate_
bool fault_watchdog_warned_
void recvCanGps(const std::vector< can_msgs::Frame::ConstPtr > &msgs)
ros::Publisher pub_surround_
void recvEnable(const std_msgs::Empty::ConstPtr &msg)
void recvCanImu(const std::vector< can_msgs::Frame::ConstPtr > &msgs)
ros::Publisher pub_throttle_
ros::Publisher pub_brake_
void publishJointStates(const ros::Time &stamp, const dbw_mkz_msgs::WheelSpeedReport *wheels, const dbw_mkz_msgs::SteeringReport *steering)
ros::Subscriber sub_turn_signal_
ros::Publisher pub_fuel_level_
void faultWatchdog(bool fault, uint8_t src, bool braking)
void faultThrottle(bool fault)
void recvGearCmd(const dbw_mkz_msgs::GearCmd::ConstPtr &msg)
void overrideGear(bool override)
void recvBrakeCmd(const dbw_mkz_msgs::BrakeCmd::ConstPtr &msg)
bool enable_joint_states_
ros::Publisher pub_misc_1_
ros::Publisher pub_wheel_speeds_
ros::Publisher pub_sonar_cloud_
ros::Publisher pub_throttle_info_
ros::Publisher pub_gps_time_
ros::Publisher pub_twist_
void recvThrottleCmd(const dbw_mkz_msgs::ThrottleCmd::ConstPtr &msg)
void recvCAN(const can_msgs::Frame::ConstPtr &msg)
sensor_msgs::JointState joint_state_
ros::Publisher pub_brake_info_
ros::Publisher pub_tire_pressure_
void timerCallback(const ros::TimerEvent &event)
void overrideSteering(bool override, bool timeout)
dataspeed_can_msg_filters::ApproximateTime sync_gps_
ros::Subscriber sub_steering_
dataspeed_can_msg_filters::ApproximateTime sync_imu_
ros::Subscriber sub_brake_
ros::Publisher pub_gps_fix_
void timeoutSteering(bool timeout, bool enabled)
DbwNode(ros::NodeHandle &node, ros::NodeHandle &priv_nh)
void recvTurnSignalCmd(const dbw_mkz_msgs::TurnSignalCmd::ConstPtr &msg)