Ask Your Question
0

roslaunch to launch python SimpleHTTPServer

asked 2017-05-22 15:31:14 -0500

jys gravatar image

Is there a way to add following to roslaunch?

roscd <package>
python -m SimpleHTTPServer 8000
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-05-23 04:00:55 -0500

gvdhoorn gravatar image

updated 2017-05-23 04:01:48 -0500

Yes: create a small wrapper bash script that does roscd <package> first, then runs python -m SimpleHTTPServer 8000.

Easiest is to add this to a package, then use regular node type=".." pkg=".." name=".." syntax to start it.

Personally I try to keep any ROS-isms out of such files, by passing the output of $(find package) (an absolute path) as the first argument to the script (and then do a cd $x (where x is the correct argument nr) in the script, but make sure to take ROS args into account).

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2017-05-22 15:31:14 -0500

Seen: 80 times

Last updated: May 23 '17