Skip to content

Commit

Permalink
Expanding user path
Browse files Browse the repository at this point in the history
  • Loading branch information
pooyanjamshidi committed Mar 17, 2018
1 parent 3ddbe72 commit 56bea97
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/config_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ protected: ros::ServiceClient power_load_client;
protected: ros::ServiceServer set_bot_configuration;
protected: boost::mutex lock;
protected: Json::Value config_list;
private: const char * home = getenv("HOME");


public: ConfigurationPlugin()
{
Expand Down Expand Up @@ -63,7 +65,8 @@ protected: Json::Value config_list;
this->default_config = _sdf->Get<int>("default_config");
this->current_config = this->default_config;

std::ifstream config_file(config_path, std::ifstream::binary);

std::ifstream config_file(home + config_path, std::ifstream::binary);
json_reader.parse(config_file, this->config_list, false);

}
Expand Down

0 comments on commit 56bea97

Please sign in to comment.