asmodehn / celeros

Celery ROS python interface
0 stars 2 forks source link

ROS_HOME, not HOME #38

Open stonier opened 7 years ago

stonier commented 7 years ago

Should always default to logs in ROS_HOME which is not always HOME.

e.g. in celeros.launch:

<arg name="logfile" default="$(env HOME)/.ros/log/celeros.log" doc="location of the logfile"/>

Pythonic way:

ros_home_dir = rospkg.get_ros_home()

C++ way:

    try {
      std::string ros_home(std::getenv("ROS_HOME"));
    } catch ( std::logic_error &e) {
      p /= std::string(std::getenv("HOME"));
      p /= ".ros";
    }