Formula Student Autonomous Systems
The code for the main driverless system
Loading...
Searching...
No Matches
track_loader.hpp File Reference
#include <Eigen/Dense>
#include <ament_index_cpp/get_package_prefix.hpp>
#include <rclcpp/rclcpp.hpp>
#include <string>
#include <vector>
#include "yaml-cpp/yaml.h"
Include dependency graph for track_loader.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

Node get_child_node (Node parentNode, std::string tag)
 Get the child node from a parent node by tag.
 
void add_landmarks (Eigen::VectorXd &track, const Node &list)
 adds the landmarks in the list to the track.
 
void load_initial_state (std::string mapPath, Eigen::Vector3d &start_pose, Eigen::VectorXd &track)
 loads the map from the specified path and fills the start pose and track.
 
void load_acceleration_track (Eigen::Vector3d &start_pose, Eigen::VectorXd &track)
 loads the acceleration track from the default path.
 
void load_skidpad_track (Eigen::Vector3d &start_pose, Eigen::VectorXd &track)
 loads the skidpad track from the default path.
 
void transform_track (Eigen::VectorXd &track, Eigen::Vector3d &start_pose)
 Transforms the track as seen from the start pose.
 

Function Documentation

◆ add_landmarks()

void add_landmarks ( Eigen::VectorXd &  track,
const Node &  list 
)

adds the landmarks in the list to the track.

Parameters
trackvector to which the landmarks will be added [x1, y1, x2, y2, ...]
listnode with landmarks as children each with a "position" key

Definition at line 13 of file track_loader.cpp.

Here is the caller graph for this function:

◆ get_child_node()

Node get_child_node ( Node  parentNode,
std::string  tag 
)

Get the child node from a parent node by tag.

Parameters
parentNodeparent node from which to get the child
tagidentifier of the child node to get
Returns
Node child node with the specified tag

Definition at line 3 of file track_loader.cpp.

Here is the caller graph for this function:

◆ load_acceleration_track()

void load_acceleration_track ( Eigen::Vector3d &  start_pose,
Eigen::VectorXd &  track 
)

loads the acceleration track from the default path.

Parameters
start_posevector to fill with the start pose [x, y, theta]
trackvector to fill with the track data [x1, y1, x2, y2, ...]

Definition at line 47 of file track_loader.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ load_initial_state()

void load_initial_state ( std::string  mapPath,
Eigen::Vector3d &  start_pose,
Eigen::VectorXd &  track 
)

loads the map from the specified path and fills the start pose and track.

Parameters
mapPathpath to the map file
start_posevector to fill with the start pose [x, y, theta]
trackvector to fill with the track data [x1, y1, x2, y2, ...]

Definition at line 24 of file track_loader.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ load_skidpad_track()

void load_skidpad_track ( Eigen::Vector3d &  start_pose,
Eigen::VectorXd &  track 
)

loads the skidpad track from the default path.

Parameters
start_posevector to fill with the start pose [x, y, theta]
trackvector to fill with the track data [x1, y1, x2, y2, ...]

Definition at line 54 of file track_loader.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ transform_track()

void transform_track ( Eigen::VectorXd &  track,
Eigen::Vector3d &  start_pose 
)

Transforms the track as seen from the start pose.

Parameters
trackwill be transformed in place to the start pose
start_posewill be set to zero after the transformation

Definition at line 61 of file track_loader.cpp.

Here is the caller graph for this function: