GithubHelp home page GithubHelp logo

omrirz / pyrosenv Goto Github PK

View Code? Open in Web Editor NEW
7.0 7.0 0.0 9 KB

Set an environment for easy work with ROS in python without setting things up

License: MIT License

Python 100.00%
python python3 ros ros-kinetic ros-melodic

pyrosenv's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

pyrosenv's Issues

CvBridge not working

Thank you for this awesome package. It does not seem like cv_bridge works with pyrosenv.

I am importing it as from pyrosenv.cv_bridge import CvBridge and receiving an error saying: ModuleNotFoundError: No module named 'pyrosenv.cv_bridge'. It is possible I am just not importing it correctly.

If this has not yet been implemented, are there any plans to? I am sure there are others that would like to see support for cv_bridge too.

Thanks!

Python 2.7 / Python 3 Issue with cv_bridge

@omrirz Thanks for adding cv_bridge to your package! Since your code is meant to be run with Python 3, I am running into an issue with using cv_bridge. Here is the error that I am receiving:

    frame_0 = bridge.imgmsg_to_cv2(msg, desired_encoding = "passthrough") # Save off frame as cv_image
  File "visualize_img.py", line 67, in visualizeImage
    frame_0 = bridge.imgmsg_to_cv2(msg, desired_encoding = "passthrough") # Save off frame as cv_image
  File "/opt/ros/melodic/lib/python2.7/dist-packages/cv_bridge/core.py", line 163, in imgmsg_to_cv2
    dtype, n_channels = self.encoding_to_dtype_with_channels(img_msg.encoding)
  File "/opt/ros/melodic/lib/python2.7/dist-packages/cv_bridge/core.py", line 99, in encoding_to_dtype_with_channels
    return self.cvtype2_to_dtype_with_channels(self.encoding_to_cvtype2(encoding))
  File "/opt/ros/melodic/lib/python2.7/dist-packages/cv_bridge/core.py", line 91, in encoding_to_cvtype2
    from cv_bridge.boost.cv_bridge_boost import getCvType
ImportError: dynamic module does not define module export function (PyInit_cv_bridge_boost)

I'm unsure whether it is an issue on my end or with the package. I am pretty sure cv_bridge is just being built with python 2.7 instead of python 3 causing the issue. Let me know if you have any suggestions. Thanks again!

No problems installing in python3.8, but import not successful

Great Idea to collect all ros dependencies! I'm having trouble finding the relevant packages for reading rosbags in python3 and this will hopefully solve it all.

"no module named rospy", "no module named std_msgs" is the problem, though no error in installation phase.
...
Installing collected packages: more-itertools, attrs, iniconfig, py, toml, pluggy, pyparsing, six, packaging, pytest, pyros-config, pyros-setup, psutil, gnupg, defusedxml, pycrypto, PyYAML, distro, docutils, python-dateutil, catkin-pkg, rospkg, pyrosenv
Successfully installed PyYAML-5.3.1 attrs-20.1.0 catkin-pkg-0.4.22 defusedxml-0.6.0 distro-1.5.0 docutils-0.16 gnupg-2.3.1 iniconfig-1.0.1 more-itertools-8.5.0 packaging-20.4 pluggy-0.13.1 psutil-5.7.2 py-1.9.0 pycrypto-2.6.1 pyparsing-2.4.7 pyros-config-0.2.1 pyros-setup-0.3.0 pyrosenv-0.0.4 pytest-6.0.1 python-dateutil-2.8.1 rospkg-1.2.8 six-1.15.0 toml-0.10.1
(baghandler) [pli@zenbook ~]$ python
Python 3.8.5 (default, Aug 12 2020, 00:00:00)
[GCC 10.2.1 20200723 (Red Hat 10.2.1-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.

import pyrosenv
Traceback (most recent call last):
File "/home/pli/baghandler/lib/python3.8/site-packages/pyrosenv/init.py", line 30, in
import rospy
ModuleNotFoundError: No module named 'rospy'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/pli/baghandler/lib/python3.8/site-packages/pyrosenv/init.py", line 42, in
import rospy
ModuleNotFoundError: No module named 'rospy'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "", line 1, in
File "/home/pli/baghandler/lib/python3.8/site-packages/pyrosenv/init.py", line 51, in
sys.modules['pyrosenv.std_msgs'] = std_msgs = importlib.import_module('std_msgs')
File "/home/pli/baghandler/lib64/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ModuleNotFoundError: No module named 'std_msgs'

following https://answers.ros.org/question/343260/install-of-the-rospyrosbag-python-libraries-standalone-not-on-ubuntu/
I could install the packages I needed.

No module named 'pyparsing' python 3.8

I run "pip install pyparsing" and get: "Requirement already satisfied: pyparsing in c:\programdata\anaconda3\lib\site-packages (2.4.7)"
but when running python it failed, what can I do?

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.