[ros-users] Python version of rospack
Mike Purvis
mpurvis at clearpathrobotics.com
Thu Mar 3 15:55:45 UTC 2011
Hey,
I'm doing a bit of experimenting with getting ros_comm running on an
embedded Linux platform. For the moment, I'm ignoring roscpp (and the
roscpp-based eros project), and just concentrating on a rospy-based client,
since the platform already has a working Python 2.6 environment with expat
and yaml. This is similar work to what has been done to get rospy running on
Android devices: http://www.ros.org/wiki/android.
It seems to be basically working. The one major frustration at this point
stems from rospack being a compiled utility. Has there been any work (or
desire) to port this program to Python? I note that in roslib/packages.py,
there's a note to move the get_pkg_dir function to something not based on
rospack---would there be the possibility of them both deriving from common
library code? The ROS-android project would benefit from this as
well---manifests are currently unsupported there, possibly for this reason?
What I've done so far to get it up at all is dump the packages and stacks I
need into the root directory, and then implement a trivial stub rospack,
like so:
#!/usr/bin/env python
import sys, os
cmd = sys.argv[1]
if cmd == 'find':
paths = ["/root/", "/root/messages/", "/root/common_msgs/",
"/root/ros/core/"]
pkg = sys.argv[2]
for path in paths:
if os.path.exists(path + pkg):
print(path + pkg)
exit()
Doesn't look like much, but with manual dependency resolution and running of
genmsg_py.py, that's enough to launch a rospy node which communicates to an
offboard roscore.
Any thoughts?
--
**
*Mike Purvis* | Software Architect | Clearpath Robotics, Inc.
295 Hagey Blvd. Waterloo, Ontario N2L 6R5 Canada
*T: * +1 (800) 301-3863 x805 | *E:** *mpurvis at clearpathrobotics.com | *W:*
clearpathrobotics.com <http://www.clearpathrobotics.com>**
*
*
*Your Unmanned Experts **TM***
*
*
This electronic communication (including any attachments) is CONFIDENTIAL
AND LEGALLY PRIVILEGED. Any unauthorized use or disclosure is strictly
prohibited. If you are not the intended recipient, you are hereby notified
that any review, retransmission, conversion to hard copy, copying,
circulation or other use of this message and any attachments is strictly
prohibited. The recipient should check this email and any attachments for
the presence of viruses. The company accepts no liability for any damage
caused by any virus transmitted by this email. Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osuosl.org/pipermail/ros-users/attachments/20110303/92b4895c/attachment-0002.html>
More information about the ros-users
mailing list