Giter Site home page Giter Site logo

Comments (6)

raphaellmsousa avatar raphaellmsousa commented on August 20, 2024

Man, did you find a solution? I have same problem here!

from ros-bridge.

berndgassmann avatar berndgassmann commented on August 20, 2024

I believe you don't have the respective 'egg' file in the pythonpath (see readme).

from ros-bridge.

berndgassmann avatar berndgassmann commented on August 20, 2024

Ah wait. Why do you have local changes?

The move of the import line is the root cause for the problem you have in running the bridge.
If I remember correctly, the check.sh only checks and doesn't change. Maybe something changed that the autopep8 is moving code around now?
But the imports have to remain where they are. At the end (that's why there is a comment) since python is not able to hide interface from implementation...

from ros-bridge.

jbleck avatar jbleck commented on August 20, 2024

Just confirmed that autopep8 is moving these import. I don't have experience modifying autopep8 commands, but right now they're borked for the following config:

Environment is:
Ubuntu 16.04

$ autopep8 --version
autopep8 1.4.3 (pycodestyle: 2.5.0)

'''
diff --git a/src/carla_ros_bridge/vehicle.py b/src/carla_ros_bridge/vehicle.py
index 7e2e0bb..604613f 100644
--- a/src/carla_ros_bridge/vehicle.py
+++ b/src/carla_ros_bridge/vehicle.py
@@ -5,6 +5,7 @@

authors: Bernd Gassmann ([email protected])

+from carla_ros_bridge.ego_vehicle import EgoVehicle # pylint: disable=wrong-import-position
"""
Classes to handle Carla vehicles
"""
@@ -170,5 +171,5 @@ class Vehicle(Actor):

     self.publish_ros_message('/carla/objects', vehicle_object)

this import has to be at the end to resolve cyclic dependency

-from carla_ros_bridge.ego_vehicle import EgoVehicle # pylint: disable=wrong-import-position
'''

from ros-bridge.

raphaellmsousa avatar raphaellmsousa commented on August 20, 2024

Now I have:
from cv_bridge import CvBridge

Traceback (most recent call last):
  File "/home/raphaell/ros/catkin_ws_for_carla/src/ros-bridge/src/carla_ros_bridge/client.py", line 16, in <module>
    from carla_ros_bridge.bridge import CarlaRosBridge
  File "/home/raphaell/ros/catkin_ws_for_carla/src/ros-bridge/src/carla_ros_bridge/bridge.py", line 20, in <module>
    from carla_ros_bridge.parent import Parent
  File "/home/raphaell/ros/catkin_ws_for_carla/src/ros-bridge/src/carla_ros_bridge/parent.py", line 253, in <module>
    from carla_ros_bridge.sensor import Sensor       # noqa, pylint: disable=wrong-import-position
  File "/home/raphaell/ros/catkin_ws_for_carla/src/ros-bridge/src/carla_ros_bridge/sensor.py", line 169, in <module>
    from carla_ros_bridge.camera import Camera  # noqa, pylint: disable=wrong-import-position
  File "/home/raphaell/ros/catkin_ws_for_carla/src/ros-bridge/src/carla_ros_bridge/camera.py", line 18, in <module>
    from cv_bridge import CvBridge
ImportError: No module named cv_bridge

from ros-bridge.

raphaellmsousa avatar raphaellmsousa commented on August 20, 2024

After installing cv_bridge

setting /run_id to f7acd508-2acc-11e9-bd9d-1831bfbbc6ee
process[rosout-1]: started with pid [18111]
started core service [/rosout]
process[carla_ros_bridge-2]: started with pid [18114]
/home/raphaell/.local/lib/python2.7/site-packages/simple_pid/PID.py:22: UserWarning: time.monotonic() not available in python < 3.3, using time.time() as fallback
  warnings.warn('time.monotonic() not available in python < 3.3, using time.time() as fallback')
Traceback (most recent call last):
  File "/home/raphaell/ros/catkin_ws_for_carla/src/ros-bridge/src/carla_ros_bridge/client.py", line 16, in <module>
    from carla_ros_bridge.bridge import CarlaRosBridge
  File "/home/raphaell/ros/catkin_ws_for_carla/src/ros-bridge/src/carla_ros_bridge/bridge.py", line 20, in <module>
    from carla_ros_bridge.parent import Parent
  File "/home/raphaell/ros/catkin_ws_for_carla/src/ros-bridge/src/carla_ros_bridge/parent.py", line 255, in <module>
    from carla_ros_bridge.vehicle import Vehicle     # noqa, pylint: disable=wrong-import-position
  File "/home/raphaell/ros/catkin_ws_for_carla/src/ros-bridge/src/carla_ros_bridge/vehicle.py", line 175, in <module>
    from carla_ros_bridge.ego_vehicle import EgoVehicle  # noqa, pylint: disable=wrong-import-position
  File "/home/raphaell/ros/catkin_ws_for_carla/src/ros-bridge/src/carla_ros_bridge/ego_vehicle.py", line 23, in <module>
    from carla import VehicleControl
ImportError: cannot import name VehicleControl

from ros-bridge.

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.