Comments (7)
With the current instructions you don't need a virtual env in the first place (https://github.com/ros2/examples/wiki).
Please post information about the platform you are using as well as a complete sequence of commands to reproduce your problem.
from ament_tools.
I guess I didn't see the wiki and set out to compile this without instructions. Which worked for the most part.
Using Mac OS 10.9.5, but it seems like the problem could be reproducible on any platform since it's a Python site-package location issue.
After having installed opensplice using the brew osrf/ros2 tap, I mostly did :
$ virtualenv -p /usr/local/bin/python3 ~/virtenv/ros2
$ source ~/virtenv/ros2/bin/activate
$ cd ament_package && python setup.py install
$ cd ament_tools && python setup.py install
$ ament build ros_middleware_interface
$ ament build ros_middleware_opensplice
[ .. a bunch more ament builds ..]
$ ament build examples
[ ... ]
[ 25%] Generating C++ code for ROS interfaces
/home/mtourne/virtenv/ros2/bin/python3 /home/mtourne/test/install/lib/rosidl_generator_cpp/rosidl_generator_cpp --pkg-name builtin_msgs --ros-interface-files /home/mtourne/test/examples/builtin_msgs/msg/Duration.msg /home/mtourne/test/examples/builtin_msgs/msg/Time.msg --deps --output-dir /home/mtourne/test/build/builtin_msgs/rosidl_generator_cpp/builtin_msgs --template-dir /home/mtourne/test/install/share/rosidl_generator_cpp/resource
Traceback (most recent call last):
File "/home/mtourne/test/install/lib/rosidl_generator_cpp/rosidl_generator_cpp", line 7, in <module>
from rosidl_generator_cpp import generate_cpp
ImportError: No module named 'rosidl_generator_cpp'
I think what is going on is having ament installed a virtualenv will override all site-package paths that you might be expecting
ps. virtualenv was kind of a necessity here, since my system uses python 2.7 and some of ament is python3 only. using python2.7 results in an other error on shlex.quotes() which is undefined.
from ament_tools.
@mtourne I'm the resident OS X developer on the ROS 2 stuff, I'll try to rebuild my environment from scratch and see if I can reproduce this issue.
Thanks for pointing it out.
from ament_tools.
Please provide the missing information of your commands, e.g.
- you must have installed the Python package
osrf_pycommon
(sinceament build
depends on that)? - what is
ros_middleware_interface
in your fifth line? A folder containing the repository? - there must be commands missing before and in between the
ament build
invocations - are you ever sourcing any of the generated
setup
files?
from ament_tools.
@mtourne I was able to create a fresh working copy using the instructions here: https://github.com/ros2/examples/wiki
I just noticed that zsh support seems broken again, but I am able to use this with or without a virtual env.
from ament_tools.
I followed the instructions given in the wiki, and everything worked like a charm.
I went down a weird path because I didn't realize there was doc somewhere, maybe pointing it out in the README.md file could help ?
With a minor detail, it didn't seem to setup OSPL_URI in my env. (I'm using the zsh setup which might be the problem), so every call to create_participant would fail.
I had a OSLP_URI leftover from some other tests (from ros_dds), so it worked the first time around but not after a reboot.
from ament_tools.
@mtourne that's the problem with zsh, I'll have to look at the most recent shell code changes and fix it up.
If you run bash
and source local_setup.bash
it should work out of the box.
from ament_tools.
Related Issues (20)
- changing ament install prefix doesn't change the cmake install prefix HOT 2
- uninstalling after installing to a different directory HOT 5
- uninstall verb fails HOT 1
- We should validate ament_cmake packages after installation HOT 6
- Sourcing overlay workspace's setup file isn't enough for python packages HOT 2
- ament build_pkg doesn't respect other verbs HOT 10
- assert that ament_cmake packages register in the ament_index HOT 2
- No setup.bash for --isolated compilation HOT 2
- Add error summary at the end of `ament test` HOT 4
- Proposal: make `ament test` return non-zero on test failure HOT 5
- Parallel build waiting for package forever HOT 1
- Symlinked overlay installation doesn't have preference for ament_python packages HOT 8
- option to build only a package and its dependencies HOT 6
- Build of package on windows hangs sometimes HOT 2
- Because of unquoted path ament fails on Windows HOT 3
- ament build fails to find solution file when cmake project name differs from package manifest name HOT 4
- Test Report Generation for ament test tools HOT 2
- SyntaxError when building pure Python package with Extension HOT 6
- Failed to compile extension due to out-of-source build HOT 5
- python3-pytest doesn't support option "-o" and it results in error while running python unittest of a ros2 component HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ament_tools.