You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
336 B
C++
15 lines
336 B
C++
|
3 years ago
|
#include <iostream>
|
||
|
|
#include "yaml-cpp/yaml.h"
|
||
|
|
|
||
|
|
using namespace std;
|
||
|
|
|
||
|
|
int main(int argc,char** argv){
|
||
|
|
|
||
|
|
YAML::Node config = YAML::LoadFile("/home/dodo/ardupilot_ws/src/class_model/src/config.yaml");
|
||
|
|
|
||
|
|
cout <<"x:"<<config["routh1"]["x"].as<float>()<<endl;
|
||
|
|
cout <<"y:"<<config["routh1"]["y"].as<float>()<<endl;
|
||
|
|
|
||
|
|
|
||
|
|
return 0;
|
||
|
|
}
|