ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

It's a bad idea to rely on changing the current directory. It won't even work properly in some languages because of multithreading. Instead, you should use rosrun or roslaunch to start your nodes. Those utilities will find the right location within your workspace so you don't have to hard-code paths. As well, if you need configuration files or output locations, those can be specified as node parameters.