Class PredictGoalROS
Defined in File predict_goal_ros.h
Class Documentation
-
class PredictGoalROS
ROS wrapper for the Bayesian goal prediction system.
Public Functions
-
PredictGoalROS()
Default constructor, initializes ROS communication.
-
~PredictGoalROS() = default
Default destructor.
Private Functions
-
void trackedAgentsCB(const cohan_msgs::TrackedAgents::ConstPtr &msg)
Callback for tracked agents updates. This method processes incoming tracked agents data and updates the internal state.
- Parameters:
msg – Message containing tracked agents data
-
bool loadGoals(const std::string &file)
Load goal positions from a YAML file. This method reads goal positions from the specified YAML file and populates the goals map.
- Parameters:
file – Path to the YAML file containing goals
- Returns:
True if goals were loaded successfully, false otherwise
-
void loadRosParamFromNodeHandle(const ros::NodeHandle &private_nh)
Loads ROS parameters from the node handle.
- Parameters:
private_nh – Private node handle containing parameters
Private Members
-
ros::Subscriber agents_sub_
Subscriber for tracked agents updates.
-
ros::Publisher goal_pub_
Publisher for predicted goals.
-
agents::BayesianGoalPrediction predictor_
Instance of the Bayesian goal prediction algorithm.
-
std::map<std::string, Eigen::Vector2d> goals_
Map of goal names to their positions.
-
std::map<int, std::string> agent_goal_predicts_
Map of agent IDs to their predicted goals.
-
int window_size_
Size of the sliding window used for predictions.
-
std::string tracked_agents_sub_topic_
-
std::string predicted_goal_topic_
ROS topic names for subscribers and publishers.
-
std::string ns_
Namespace for the node.
-
std::string goals_file_
File name of the env goals.
-
PredictGoalROS()