- Clone this repository to your catkin workspace's
src
folder. - Assume you need to create a folder to save some data, e.g.
YOUR_DATA_DIR
. - Create a new folder named
YOUR_DATA_DIR
indata_base
folder. Naming convention: use all simple alphanumerics, no spaces, no special characters, no underscores . - Empty folders are not tracked by git, so you need to create a file named
.gitkeep
inYOUR_DATA_DIR
folder, for others to see that you have created a new folder for some data. - However, what is in
YOUR_DATA_DIR
folder will be tracked by git, so you need to addYOUR_DATA_DIR/
to.gitignore
file (open it and see previous cases), if you don't want to upload your data to github (may be data is specific to a particular runtime and does not need to be shared).
#include <ros/package.h>
std::string filePath = ros::package::getPath("data_base") + "/<YOUR_DATA_DIR>/<YOUR_FILE>.txt"; // whatever file extension you want
- Saving data from a ROS node to a file, e.g. a text file, a csv file, a json file, etc.
- Global 3D map:
data_base/map3d/
- PRM graph:
data_base/prmgraph/
- Global 3D map:
- Special robot positions, e.g. home position, charging position, etc.
- Home position:
data_base/homepos/
- Charging position:
data_base/chargingpos/
- Initial position:
data_base/initpos/
- Home position: