ros-visualization / rviz

ROS 3D Robot Visualizer
BSD 3-Clause "New" or "Revised" License
792 stars 459 forks source link

rviz::YamlConfigReader relative path #1784

Closed GavinGaoYan closed 1 year ago

GavinGaoYan commented 1 year ago

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

but

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

what is the reason

GavinGaoYan commented 1 year ago

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

rhaschke commented 1 year ago

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