Code Monkey home page Code Monkey logo

Comments (4)

CodeFinder2 avatar CodeFinder2 commented on June 16, 2024 1

[...]
This looks like you haven't installed the quaternion package. Please follow the installation instructions carefully: pip install numpy numpy-quaternion (you may need sudo).
Also, make sure you start the moveit server before running the moveit demo (follow instructions in the README for running the demo).

The problem with this is: numpy also gets installed as a system package along with various ROS (system) packages. Installing it with pip(3) and using sudo is definitely not a good idea.

Only installing numpy-quaternion via pip (pip3 install --user numpy-quaternion because there is no system package available for Noetic / Ubuntu 20.04) causes this error:

RuntimeError: module compiled against API version 0xe but this version of numpy is 0xd
Traceback (most recent call last):
  File "/hidden/catkin_ws/devel/lib/panda_sim_custom_action_server/start_gripper_action_server.py", line 15, in <module>
    exec(compile(fh.read(), python_script, 'exec'), context)
  File "/hidden/catkin_ws/src/panda_simulator/panda_sim_custom_action_server/scripts/start_gripper_action_server.py", line 31, in <module>
    from panda_sim_custom_action_server import GripperActionServer
  File "/hidden/catkin_ws/devel/lib/python3/dist-packages/panda_sim_custom_action_server/__init__.py", line 34, in <module>
    exec(__fh.read())
  File "<string>", line 18, in <module>
  File "/hidden/catkin_ws/src/panda_simulator/panda_sim_custom_action_server/src/panda_sim_custom_action_server/joint_trajectory_action_server.py", line 56, in <module>
    import franka_interface
  File "/hidden/catkin_ws/src/franka_ros_interface/franka_interface/src/franka_interface/__init__.py", line 18, in <module>
    from .arm import ArmInterface
  File "/hidden/catkin_ws/src/franka_ros_interface/franka_interface/src/franka_interface/arm.py", line 39, in <module>
    import quaternion
  File "/home/abo/.local/lib/python3.8/site-packages/quaternion/__init__.py", line 25, in <module>
    from .numpy_quaternion import (
ImportError: numpy.core.multiarray failed to import

I think this is caused by the fact that the system comes with a numpy version that is different from the one that is being used by numpy-quaternion (but not 100% sure).

Any better ideas? (I am having the same / a very similiar problem...)

Edit: okay, fixed this with:

sudo apt install python-is-python3 python3-pip python3-numpy # just to be sure all deps are avail wrt. to this problem/issue
python -m pip install --user numpy-quaternion
# Optionally: python -m pip install --user numba scipy
python -m pip install numpy --upgrade --user

from panda_simulator.

justagist avatar justagist commented on June 16, 2024 1

Hi @CodeFinder2, thanks for this!

I agree that using sudo is probably not safe for pip commands, but quaternion and numpy are pretty standard packages and I would assume they would be safe to install using sudo. But you'd be right if you say this is not a safe assumption.

I think this is caused by the fact that the system comes with a numpy version that is different from the one that is being used by numpy-quaternion (but not 100% sure).

Yes, I would have come to the same conclusion, and would have suggested upgrading the installed numpy package and trying to install quaternion again, as you have done.

Thanks anyway for your detailed solution.
Did you have to install python-is-python3 package to solve this issue, or was this only to be safe?

from panda_simulator.

CodeFinder2 avatar CodeFinder2 commented on June 16, 2024 1

python-is-python3 is not necessary. Calling python3 explicitly would work as well. 🙂

from panda_simulator.

justagist avatar justagist commented on June 16, 2024

the terminal will report ImportError: No module named quaternion [joint_trajectory_server_emulator-11] process has died [pid 15370, exit code 1

This looks like you haven't installed the quaternion package. Please follow the installation instructions carefully: pip install numpy numpy-quaternion (you may need sudo).
Also, make sure you start the moveit server before running the moveit demo (follow instructions in the README for running the demo).

from panda_simulator.

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.