canonical / turtlebot3c-snap

turtlebot3c packaged as a snap.
3 stars 4 forks source link

fix(ROS_HOME): env variable only necessary for navigation and mapping #4

Closed Guillaumebeuzeboc closed 1 year ago

Guillaumebeuzeboc commented 1 year ago

This is due to rospack using a non-standard way to define the home of a user

Rospack doesn’t use the $HOME environment variable but uses the password structure to get the home directory. By default, snaps make sure that the environment variable $HOME is pointing to a writable directory, but unfortunately rospack is not using it. The good news is that rospack first tries to read the $ROS_HOME.

artivis commented 1 year ago

If I'm not mistaken ROS logging also relies on ROS_HOME. If that is the case, we probably want all apps to at the same place.

Guillaumebeuzeboc commented 1 year ago

Yes indeed but ROS logging falls back to $HOME if $ROS_HOME is not defined. https://github.com/ros/ros_comm/blob/noetic-devel/clients/roscpp/src/libros/file_log.cpp#L83 So in the case of ROS logging it's not necessary to specify the ROS_HOME.

artivis commented 1 year ago

Let's keep all applications logging at the same path for consistency. Closing.