ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
We see this:
if __name__ == '__main__':
try:
[..]
serv = server(
"~/arm_cws/src/arm_data_frame/data/testCoordinates.csv")
[..]
you are using a relative path for filePath
.
roslaunch
changes the CWD
for all nodes before starting them.
So this will work with rosrun
, but not with roslaunch
.
If you want to know more about it, please search ROS Answers with Google (append site:answers.ros.org
to your query).
To make things work: use absolute paths, and to avoid hard-coding an absolute path into your scripts, use the $(find <your_pkg_name>)
substitution arg supported by roslaunch
. That would allow you to use package relative paths.
But you of course don't have to use that. As long as the parameter contains an absolute path, it should work.
2 | No.2 Revision |
We see this:
if __name__ == '__main__':
try:
[..]
serv = server(
"~/arm_cws/src/arm_data_frame/data/testCoordinates.csv")
[..]
you are using a relative path for filePath
.
roslaunch
changes the CWD
for all nodes before starting them.
So this will work with rosrun
, but not with roslaunch
.
If you want to know more about it, please search ROS Answers with Google (append site:answers.ros.org
to your query).
To make things work: use absolute paths, and to avoid hard-coding an absolute path into your scripts, use the $(find <your_pkg_name>)
substitution arg supported by roslaunch
. That would allow you to use package relative paths.
But you of course don't have to use that. As long as the parameter contains an absolute path, it should work.
3 | No.3 Revision |
We see this:this in your "Server" script:
if __name__ == '__main__': try: [..] serv = server( "~/arm_cws/src/arm_data_frame/data/testCoordinates.csv") [..]
you are using a relative path for filePath
.
roslaunch
changes the CWD
for all nodes before starting them.
So this will work with rosrun
, but not with roslaunch
.
If you want to know more about it, please search ROS Answers with Google (append site:answers.ros.org
to your query).
To make things work: use absolute paths, and to avoid hard-coding an absolute path into your scripts, use the $(find <your_pkg_name>)
substitution arg supported by roslaunch
. That would allow you to use package relative paths.
But you of course don't have to use that. As long as the parameter contains an absolute path, it should work.
4 | No.4 Revision |
We see this in your "Server" script:
if __name__ == '__main__': try: [..] serv = server( "~/arm_cws/src/arm_data_frame/data/testCoordinates.csv") [..]
you are using a relative path for filePath
.
roslaunch
changes the CWD
for all nodes before starting them.them. See the answer by ipso
on #q38045 for a (very old) Q&A about this, and the links to the roslaunch
documentation where this is explained.
So this will work with rosrun
, but not with roslaunch
.
If you want to know more about it, please search ROS Answers with Google (append site:answers.ros.org
to your query).
To make things work: use absolute paths, and to avoid hard-coding an absolute path into your scripts, use the $(find <your_pkg_name>)
substitution arg supported by roslaunch
. That would allow you to use package relative paths.
But you of course don't have to use that. As long as the parameter contains an absolute path, it should work.
5 | No.5 Revision |
We see this in your "Server" script:
if __name__ == '__main__': try: [..] serv = server( "~/arm_cws/src/arm_data_frame/data/testCoordinates.csv") [..]
you are using a relative path for filePath
.
roslaunch
changes the CWD
for all nodes before starting them. See the answer by #q235337 for a ipso
on #q38045(very old) previous Q&A about this, and the links to the roslaunch
documentation where this is explained.
So this will work with rosrun
, but not with roslaunch
.
If you want to know more about it, please search ROS Answers with Google (append site:answers.ros.org
to your query).
To make things work: use absolute paths, and to avoid hard-coding an absolute path into your scripts, use the $(find <your_pkg_name>)
substitution arg supported by roslaunch
. That would allow you to use package relative paths.
But you of course don't have to use that. As long as the parameter contains an absolute path, it should work.