Move Base Logger
Usage
Runs the following command to begin logging:
rosrun husky_slam_simulation move_base_logger_node
The terminal window will display the path to the logs and their names. Be sure to stop the node before attempting to open the logs.
Functions
Constructors:
MoveBaseLogger()
Sets initial values of member variables to null
Requires no parameters
Deconstructors:
~MoveBaseLogger()
There are no member variables declared on the heap to free
Requires no parameters
Public Functions:
Void run()
Initializes the ROS node under the name “move_base_logger”
Creates associated .txt files for logging
Subscribes to:
Cmd_vel
Move_base/status
Move_base/feedback
Move_base/result
Operates at 100Hz
Void updateTwist(constgeometry_msgs::Twist& msg)
Updates the private variable twistMsg
This is a callback function for when a new Twist message is published
Void updateGoalStatus(const actionlib_msgs::GoalStatus& msg)
Updates the private variable goalStatusMsg
This is a callback function for when a new GoalStatus message is published
Void updateFeedback(const move_base_msgs::MoveBaseActionFeedback& msg)
Updates the private variable feedbackMsg
This is a callback function for when a new MoveBaseActionFeedback message is published
Void updateResult(const move_base_msgs::MoveBaseActionResult& msg)
Updates the private variable resultMsg
This is a callback function for when a new MoveBaseActionResult message is published
Private Functions:
Void createFile(std::string* fileName)
Requires a pointer to a string
Will edit fileName to an unique file path
- Appends ascending characters until the file path is unique
Uses fileExists
Bool fileExists(std::string filename)
Requires a string
Returns a bool
True implies the file path exists
False implies the file path does not exist