ros-visualization/rviz

rviz::YamlConfigReader relative path

Closed this issue · 2 comments

rviz::YamlConfigReader reader;
reader.readFile(demo,"/xxx/xxx/xx"); work

but

reader.readFile(demo,"../xx"); dead

what is the reason

00049 void YamlConfigReader::readFile( Config& config, const QString& filename )
00050 {
00051 std::ifstream in( qPrintable( filename ));
00052 readStream( config, in, filename );
00053 }

Probably the current working directory is not pointing to where you expect it to point. There is no fundamental reason that this could fail.