66 for(
const auto& elem : topicList)
68 ss<<
"/" << elem.second;
79 for(
const auto& elem : topicList)
84 else if (
CheckTopic(elem.first,
"orderUpdateId"))
90 else if (
CheckTopic(elem.first,
"lastNodeSequenceId"))
98 else if (
CheckTopic(elem.first,
"positionInitialized"))
100 else if (
CheckTopic(elem.first,
"localizationScore"))
102 else if (
CheckTopic(elem.first,
"deviationRange"))
108 else if (
CheckTopic(elem.first,
"mapDescription"))
118 else if (
CheckTopic(elem.first,
"newBaseRequest"))
120 else if (
CheckTopic(elem.first,
"distanceSinceLastNode"))
122 else if (
CheckTopic(elem.first,
"actionStates"))
124 else if (
CheckTopic(elem.first,
"batteryState"))
126 else if (
CheckTopic(elem.first,
"batteryCharge"))
128 else if (
CheckTopic(elem.first,
"batteryHealth"))
134 else if (
CheckTopic(elem.first,
"operatingMode"))
138 else if (
CheckTopic(elem.first,
"information"))
140 else if (
CheckTopic(elem.first,
"safetyState"))
144 else if (
CheckTopic(elem.first,
"fieldViolation"))
152 msg->pose.pose.orientation.x,
153 msg->pose.pose.orientation.y,
154 msg->pose.pose.orientation.z,
155 msg->pose.pose.orientation.w);
157 double roll, pitch, yaw;
158 m.getRPY(roll,pitch,yaw);
193 stateMessage.batteryState.batteryCharge=msg->percentage*100.0;
228 stateMessage.agvPosition.positionInitialized=msg->positionInitialized;
229 stateMessage.agvPosition.localizationScore=msg->localizationScore;
230 stateMessage.agvPosition.deviationRange=msg->deviationRange;
235 stateMessage.agvPosition.mapDescription=msg->mapDescription;
243 if (
CheckRange(0.0,1.0,msg->data,
"AGV Position Localization Score"))
290 stateMessage.batteryState.batteryHealth=msg->batteryHealth;
291 stateMessage.batteryState.batteryCharge=msg->batteryCharge;
292 stateMessage.batteryState.batteryVoltage=msg->batteryVoltage;
325 stateMessage.safetyState.fieldViolation=msg->fieldViolation;
338 int main(
int argc,
char **argv)
void BatteryStateReachCallback(const std_msgs::UInt32::ConstPtr &msg)
std::map< std::string, ros::Publisher > messagePublisher
void AGVPositionLocalizationScoreCallback(const std_msgs::Float64::ConstPtr &msg)
ros::Time lastUpdateTimestamp
int main(int argc, char **argv)
void ROSBatteryInfoCallback(const sensor_msgs::BatteryState::ConstPtr &msg)
ros::Duration updateInterval
void EdgeStatesCallback(const vda5050_msgs::EdgeStates::ConstPtr &msg)
ros::Subscriber actionStatesSub
Subscriber subscribe(const std::string &topic, uint32_t queue_size, void(T::*fp)(M), T *obj, const TransportHints &transport_hints=TransportHints())
void SafetyStateCallback(const vda5050_msgs::SafetyState::ConstPtr &msg)
vda5050_msgs::State stateMessage
std::map< std::string, std::string > GetTopicPublisherList()
void AGVPositionMapDescriptionCallback(const std_msgs::String::ConstPtr &msg)
bool CheckRange(double lowerRange, double upperRange, double value, std::string msg_name)
std::string getTopicStructurePrefix()
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
void LastNodeSequenceIdCallback(const std_msgs::UInt32::ConstPtr &msg)
void LoadsCallback(const vda5050_msgs::Loads::ConstPtr &msg)
void PausedCallback(const std_msgs::Bool::ConstPtr &msg)
void AGVPositionCallback(const vda5050_msgs::AGVPosition::ConstPtr &msg)
void SafetyStateFieldViolationCallback(const std_msgs::Bool::ConstPtr &msg)
void ActionStateCallback(const vda5050_msgs::ActionState::ConstPtr &msg)
void BatteryStateCallback(const vda5050_msgs::BatteryState::ConstPtr &msg)
void LinkSubscriptionTopics(ros::NodeHandle *nh)
void ROSVelocityCallback(const nav_msgs::Odometry::ConstPtr &msg)
void InformationCallback(const vda5050_msgs::Information::ConstPtr &msg)
vda5050_msgs::Header GetHeader()
double CalculateAgvOrientation(const nav_msgs::Odometry::ConstPtr &msg)
void LinkPublishTopics(ros::NodeHandle *nh)
bool CheckTopic(std::string str1, std::string str2)
void NodeStatesCallback(const vda5050_msgs::NodeStates::ConstPtr &msg)
void ZoneSetIdCallback(const std_msgs::String::ConstPtr &msg)
void AGVPositionMapIdCallback(const std_msgs::String::ConstPtr &msg)
Publisher advertise(const std::string &topic, uint32_t queue_size, bool latch=false)
void OrderUpdateIdCallback(const std_msgs::UInt32::ConstPtr &msg)
void BatteryStateBatteryHealthCallback(const std_msgs::Int8::ConstPtr &msg)
std::map< std::string, ros::Subscriber > subscribers
void DrivingCallback(const std_msgs::Bool::ConstPtr &msg)
void OperatingModeCallback(const std_msgs::String::ConstPtr &msg)
void NewBaseRequestCallback(const std_msgs::Bool::ConstPtr &msg)
void SafetyStateEstopCallback(const std_msgs::String::ConstPtr &msg)
void ErrorsCallback(const vda5050_msgs::Errors::ConstPtr &msg)
void OrderIdCallback(const std_msgs::String::ConstPtr &msg)
void BatteryStateChargingCallback(const std_msgs::Bool::ConstPtr &msg)
ROSCPP_DECL void spinOnce()
void AGVPositionInitializedCallback(const std_msgs::Bool::ConstPtr &msg)
void ROSAGVPositionCallback(const nav_msgs::Odometry::ConstPtr &msg)
void LastNodeIdCallback(const std_msgs::String::ConstPtr &msg)
void DistanceSinceLastNodeCallback(const std_msgs::Float64::ConstPtr &msg)
void AGVPositionDeviationRangeCallback(const std_msgs::Float64::ConstPtr &msg)
std::map< std::string, std::string > GetTopicSubscriberList()