42 #include <can_msgs/Frame.h> 43 #include <dbw_pacifica_msgs/BrakeCmd.h> 44 #include <dbw_pacifica_msgs/BrakeReport.h> 45 #include <dbw_pacifica_msgs/AcceleratorPedalCmd.h> 46 #include <dbw_pacifica_msgs/AcceleratorPedalReport.h> 47 #include <dbw_pacifica_msgs/SteeringCmd.h> 48 #include <dbw_pacifica_msgs/SteeringReport.h> 49 #include <dbw_pacifica_msgs/GearCmd.h> 50 #include <dbw_pacifica_msgs/GearReport.h> 51 #include <dbw_pacifica_msgs/MiscCmd.h> 52 #include <dbw_pacifica_msgs/MiscReport.h> 53 #include <dbw_pacifica_msgs/WheelPositionReport.h> 54 #include <dbw_pacifica_msgs/WheelSpeedReport.h> 55 #include <dbw_pacifica_msgs/TirePressureReport.h> 56 #include <dbw_pacifica_msgs/SurroundReport.h> 57 #include <dbw_pacifica_msgs/DriverInputReport.h> 58 #include <dbw_pacifica_msgs/LowVoltageSystemReport.h> 59 #include <dbw_pacifica_msgs/ActuatorControlMode.h> 60 #include <dbw_pacifica_msgs/Brake2Report.h> 61 #include <dbw_pacifica_msgs/Steering2Report.h> 62 #include <dbw_pacifica_msgs/GlobalEnableCmd.h> 63 #include <dbw_pacifica_msgs/FaultActionsReport.h> 64 #include <dbw_pacifica_msgs/HmiGlobalEnableReport.h> 66 #include <sensor_msgs/Imu.h> 67 #include <sensor_msgs/JointState.h> 68 #include <geometry_msgs/TwistStamped.h> 69 #include <std_msgs/Empty.h> 70 #include <std_msgs/Bool.h> 71 #include <std_msgs/String.h> 79 #include <pdu_msgs/RelayCommand.h> 80 #include <pdu_msgs/RelayState.h> 93 void recvEnable(
const std_msgs::Empty::ConstPtr& msg);
94 void recvDisable(
const std_msgs::Empty::ConstPtr& msg);
95 void recvCAN(
const can_msgs::Frame::ConstPtr& msg);
96 void recvCanImu(
const std::vector<can_msgs::Frame::ConstPtr> &msgs);
97 void recvCanGps(
const std::vector<can_msgs::Frame::ConstPtr> &msgs);
98 void recvBrakeCmd(
const dbw_pacifica_msgs::BrakeCmd::ConstPtr& msg);
100 void recvSteeringCmd(
const dbw_pacifica_msgs::SteeringCmd::ConstPtr& msg);
101 void recvGearCmd(
const dbw_pacifica_msgs::GearCmd::ConstPtr& msg);
102 void recvMiscCmd(
const dbw_pacifica_msgs::MiscCmd::ConstPtr& msg);
126 inline bool fault() {
return fault_brakes_ || fault_accelerator_pedal_ || fault_steering_ || fault_steering_cal_ ||
fault_watchdog_; }
127 inline bool override() {
return override_brake_ || override_accelerator_pedal_ || override_steering_ ||
override_gear_; }
128 inline bool clear() {
return enable_ &&
override(); }
158 void publishJointStates(
const ros::Time &stamp,
const dbw_pacifica_msgs::WheelSpeedReport *wheels,
const dbw_pacifica_msgs::SteeringReport *steering);
218 #endif // _DBW_NODE_H_ void recvGearCmd(const dbw_pacifica_msgs::GearCmd::ConstPtr &msg)
bool fault_watchdog_warned_
void publishJointStates(const ros::Time &stamp, const dbw_pacifica_msgs::WheelSpeedReport *wheels, const dbw_pacifica_msgs::SteeringReport *steering)
ros::Publisher pub_brake_2_report_
void recvMiscCmd(const dbw_pacifica_msgs::MiscCmd::ConstPtr &msg)
void faultWatchdog(bool fault, uint8_t src, bool braking)
ros::Publisher pub_sys_enable_
ros::Subscriber sub_global_enable_
void recvCAN(const can_msgs::Frame::ConstPtr &msg)
void recvCanImu(const std::vector< can_msgs::Frame::ConstPtr > &msgs)
ros::Publisher pub_driver_input_
sensor_msgs::JointState joint_state_
ros::Publisher pub_fault_actions_report_
void recvAcceleratorPedalCmd(const dbw_pacifica_msgs::AcceleratorPedalCmd::ConstPtr &msg)
void recvDisable(const std_msgs::Empty::ConstPtr &msg)
ros::Publisher pub_wheel_speeds_
bool enabled_accelerator_pedal_
ros::Subscriber sub_gear_
void timeoutAcceleratorPedal(bool timeout, bool enabled)
ros::Publisher pub_steering_2_report_
void faultSteeringCal(bool fault)
ros::Publisher pub_brake_
void overrideSteering(bool override)
ros::Publisher pdu1_relay_pub_
ros::Publisher pub_low_voltage_system_
ros::Subscriber sub_accelerator_pedal_
void timeoutSteering(bool timeout, bool enabled)
void timerCallback(const ros::TimerEvent &event)
ros::Subscriber sub_brake_
bool fault_watchdog_using_brakes_
void timeoutBrake(bool timeout, bool enabled)
ros::Subscriber sub_misc_
void recvGlobalEnableCmd(const dbw_pacifica_msgs::GlobalEnableCmd::ConstPtr &msg)
void recvEnable(const std_msgs::Empty::ConstPtr &msg)
ros::Subscriber sub_disable_
void overrideAcceleratorPedal(bool override)
ros::Subscriber sub_steering_
ros::Publisher pub_wheel_positions_
bool override_accelerator_pedal_
bool timeout_accelerator_pedal_
ros::Publisher pub_joint_states_
void recvCanGps(const std::vector< can_msgs::Frame::ConstPtr > &msgs)
void faultBrakes(bool fault)
DbwNode(ros::NodeHandle &node, ros::NodeHandle &priv_nh)
void overrideGear(bool override)
ros::Publisher pub_hmi_global_enable_report_
ros::Publisher pub_tire_pressure_
ros::Subscriber sub_enable_
void recvSteeringCmd(const dbw_pacifica_msgs::SteeringCmd::ConstPtr &msg)
bool fault_accelerator_pedal_
void faultAcceleratorPedal(bool fault)
ros::Publisher pub_surround_
void faultSteering(bool fault)
void overrideBrake(bool override)
ros::Publisher pub_steering_
void recvBrakeCmd(const dbw_pacifica_msgs::BrakeCmd::ConstPtr &msg)
ros::Publisher pub_twist_
ros::Publisher pub_accel_pedal_