GithubHelp home page GithubHelp logo

Comments (7)

dirk-thomas avatar dirk-thomas commented on August 16, 2024

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.

mtourne avatar mtourne commented on August 16, 2024

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.

wjwwood avatar wjwwood commented on August 16, 2024

@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.

dirk-thomas avatar dirk-thomas commented on August 16, 2024

Please provide the missing information of your commands, e.g.

  • you must have installed the Python package osrf_pycommon (since ament 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.

wjwwood avatar wjwwood commented on August 16, 2024

@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.

mtourne avatar mtourne commented on August 16, 2024

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.

wjwwood avatar wjwwood commented on August 16, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.