Comments (18)
@TixiaoShan : You need to use a version newer than 0.9.1. 0.9.1 will not work (as you just saw ;-))
You can get a build from last night here:
http://158.109.9.218:8080/blue/organizations/jenkins/carla/detail/master/12/artifacts
I haven't tested it, but I guess it should work.
from ros-bridge.
Same here. No setup file in that folder.
from ros-bridge.
Hi,
pip install is for users that build CARLA from source. I will update the documentation accordingly.
Regarding your issue: Currently the ROS bridge requires a CARLA version newer than 0.9.1. Either you download the current master branch from CARLA and build it from source (then pip install... is correct), or you download an intermediate build from Jenkins. In this case, you either use easy_install or simply extend your PYTHONPATH env variable to point to the egg file for your python version.
Regards,
Fabian
from ros-bridge.
We update the documentation. Please have a look. Extending the PYTHONPATH seems currently the best option to make it run smoothly on all kinds of systems.
from ros-bridge.
@fabianoboril
Thanks for the update! It seems that I still can't run the launch file because of an error.
/home/tixiao/.local/lib/python2.7/site-packages/simple_pid/PID.py:22: UserWarning: time.monotonic() not available, using time.time() as fallback. Consider using Python 3.3 or newer to get monotonic time measurements.
warnings.warn('time.monotonic() not available, using time.time() as fallback. Consider using Python 3.3 or newer to get monotonic time measurements.')
Traceback (most recent call last):
File "/home/tixiao/catkin_ws/src/ros-bridge-master/src/carla_ros_bridge/client.py", line 16, in <module>
from carla_ros_bridge.bridge import CarlaRosBridge
File "/home/tixiao/catkin_ws/src/ros-bridge-master/src/carla_ros_bridge/bridge.py", line 20, in <module>
from carla_ros_bridge.parent import Parent
File "/home/tixiao/catkin_ws/src/ros-bridge-master/src/carla_ros_bridge/parent.py", line 254, in <module>
from carla_ros_bridge.vehicle import Vehicle # pylint: disable=wrong-import-position
File "/home/tixiao/catkin_ws/src/ros-bridge-master/src/carla_ros_bridge/vehicle.py", line 174, in <module>
from carla_ros_bridge.ego_vehicle import EgoVehicle # pylint: disable=wrong-import-position
File "/home/tixiao/catkin_ws/src/ros-bridge-master/src/carla_ros_bridge/ego_vehicle.py", line 23, in <module>
from carla import VehicleControl
ImportError: cannot import name VehicleControl
python -c 'import carla;print("Success")'
gives me Success
.
from ros-bridge.
@TixiaoShan : Do you use a recent CARLA version (newer than 0.9.1)?
from ros-bridge.
@fabianoboril
Yes. I just downloaded compiled version of 0.9.1. After using command export PYTHONPATH=$PYTHONPATH:<path/to/carla/>/PythonAPI/<your_egg_file>
, I got a new error, the old error mentioned above is gone.
process[rviz-3]: started with pid [6986]
/home/tixiao/.local/lib/python2.7/site-packages/simple_pid/PID.py:22: UserWarning: time.monotonic() not available, using time.time() as fallback. Consider using Python 3.3 or newer to get monotonic time measurements.
warnings.warn('time.monotonic() not available, using time.time() as fallback. Consider using Python 3.3 or newer to get monotonic time measurements.')
[INFO] [1545403327.348348, 0.000000]: Trying to connect to localhost:2000
[INFO] [1545403327.359960, 0.000000]: Connected
Traceback (most recent call last):
File "/home/tixiao/catkin_ws/src/ros-bridge-master/src/carla_ros_bridge/bridge.py", line 157, in _carla_time_tick
self.update()
File "/home/tixiao/catkin_ws/src/ros-bridge-master/src/carla_ros_bridge/parent.py", line 156, in update
self._create_new_children()
File "/home/tixiao/catkin_ws/src/ros-bridge-master/src/carla_ros_bridge/parent.py", line 107, in _create_new_children
carla_actor=actor, parent=self)
File "/home/tixiao/catkin_ws/src/ros-bridge-master/src/carla_ros_bridge/spectator.py", line 40, in __init__
append_role_name_topic_postfix=append_role_name_topic_postfix) # pylint: disable=line-too-long
File "/home/tixiao/catkin_ws/src/ros-bridge-master/src/carla_ros_bridge/actor.py", line 46, in __init__
if carla_actor.attributes.has_key('role_name'):
AttributeError: 'Actor' object has no attribute 'attributes'
from ros-bridge.
@fabianoboril
My bad, I thought 0.9.1 is the newest. I will give it a shot. Thank you so much for your time!
from ros-bridge.
Hi, @fabianoboril
Thanks for your help. I have downloaded 0.9.2 pre-built, however it seems the ros_bridge still could not work with this version. It reports to use libpng16-dev which is in conflict with ros that uses libpng12-dev, it also refered in carla-simulator/carla#901 (comment).
I guess I have to build 0.9.2 without png support from source??
from ros-bridge.
Hi @s7ev3n:
Try installing only the library (libpng16-16) and not the dev package. Then it should work.
Merry XMas!
from ros-bridge.
Thanks!
And Merry XMas!!
from ros-bridge.
Hi @fabianoboril ,
I have downloaded the latest 0.9.2 compiled version along with the code in this repo. However, when I launch the ros bridge, I still get a similar error.
process[master]: started with pid [19641]
ROS_MASTER_URI=http://localhost:11311
setting /run_id to 3c1d9454-07c6-11e9-b9f0-638d049ea693
process[rosout-1]: started with pid [19654]
started core service [/rosout]
process[carla_ros_bridge-2]: started with pid [19672]
process[rviz-3]: started with pid [19679]
/home/tixiao/.local/lib/python2.7/site-packages/simple_pid/PID.py:22: UserWarning: time.monotonic() not available, using time.time() as fallback. Consider using Python 3.3 or newer to get monotonic time measurements.
warnings.warn('time.monotonic() not available, using time.time() as fallback. Consider using Python 3.3 or newer to get monotonic time measurements.')
Traceback (most recent call last):
File "/home/tixiao/catkin_ws/src/ros-bridge-master/src/carla_ros_bridge/client.py", line 16, in <module>
from carla_ros_bridge.bridge import CarlaRosBridge
File "/home/tixiao/catkin_ws/src/ros-bridge-master/src/carla_ros_bridge/bridge.py", line 20, in <module>
from carla_ros_bridge.parent import Parent
File "/home/tixiao/catkin_ws/src/ros-bridge-master/src/carla_ros_bridge/parent.py", line 254, in <module>
from carla_ros_bridge.vehicle import Vehicle # pylint: disable=wrong-import-position
File "/home/tixiao/catkin_ws/src/ros-bridge-master/src/carla_ros_bridge/vehicle.py", line 174, in <module>
from carla_ros_bridge.ego_vehicle import EgoVehicle # pylint: disable=wrong-import-position
File "/home/tixiao/catkin_ws/src/ros-bridge-master/src/carla_ros_bridge/ego_vehicle.py", line 23, in <module>
from carla import VehicleControl
**ImportError: cannot import name VehicleControl**
[carla_ros_bridge-2] process has died [pid 19672, exit code 1, cmd /home/tixiao/catkin_ws/src/ros-bridge-master/src/carla_ros_bridge/client.py __name:=carla_ros_bridge __log:=/home/tixiao/.ros/log/3c1d9454-07c6-11e9-b9f0-638d049ea693/carla_ros_bridge-2.log].
log file: /home/tixiao/.ros/log/3c1d9454-07c6-11e9-b9f0-638d049ea693/carla_ros_bridge-2*.log
0x17562a0 void QWindowPrivate::setTopLevelScreen(QScreen*, bool) ( QScreen(0xcbc550) ): Atte
from ros-bridge.
@TixiaoShan : It seems you're PYTHONPATH is missing the CARLA PythonAPI. Did you consider the step to extend your PYTHONPATH according to the README?
https://github.com/carla-simulator/ros-bridge/blob/master/Readme.md
export PYTHONPATH=$PYTHONPATH:<path/to/carla/>/PythonAPI/<your_egg_file>
Having set that properly, your problem should be gone!
Merry XMas!
from ros-bridge.
@fabianoboril
Yes, I did use that command to link it to the egg file in the PythonAPI folder.
Also, python -c 'import carla;print("Success")'
gives me Success.
from ros-bridge.
@TixiaoShan : If you only start python, which version does it report?
from ros-bridge.
@fabianoboril
It turns out that I forgot to add PythonAPI
folder to the path. Silly mistake. Now the ros-bridge can launch with the correct PythonAPI in carla-0.9.2.
### Thanks for your time! Happy Holiday!
from ros-bridge.
I'm getting this error
/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 21, in
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
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 254, in
from carla_ros_bridge.vehicle import Vehicle # pylint: disable=wrong-import-position
File "/home/raphaell/ros/catkin_ws_for_carla/src/ros-bridge/src/carla_ros_bridge/vehicle.py", line 174, in
from carla_ros_bridge.ego_vehicle import EgoVehicle # 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
from carla import VehicleControl
ImportError: cannot import name VehicleControl
from ros-bridge.
Try running the below to check if it pointing to the right version.
after do export of egg from pre compiled workspace
export PYTHONPATH=$PYTHONPATH:/home/user/CARLA_0.9.2/PythonAPI/carla-0.9.2-py2.7-linux-x86_64.egg
python -c 'import carla; print carla'
<module 'carla' from '/home/user/CARLA_0.9.2/PythonAPI/carla-0.9.2-py2.7-linux-x86_64.egg/carla/__init__.py'>
It is pointing to the wrong Carla version, you can delete or rename the older carla version to fix the Error
from ros-bridge.
Related Issues (20)
- UE4-CarlaUE4 crashes while importing .fbx file in the content browser, also at first python3.6 stops working and then UE4-CarlaUE4
- Can not find the location of senor_msgs in ros-bridge? HOT 1
- Bump CARLA version to 0.9.14 HOT 1
- Can carla_ros_bridge be used on windows? HOT 1
- PCL Recorder - Could not create directory
- How does CARLA server transmit simulation data through the TCP Socket to ROS? HOT 1
- Missing 0.9.13 Tag
- ROS2 😿[ERROR] [bridge-1]: process has died😿 HOT 2
- Linker error librviz_carla_plugin.so: undefined symbol: fromMsg HOT 2
- My ROS system is ROS2 foxy, but there was an error compiling ROS bridge on Ubuntu 20. I don't know how to solve it HOT 8
- About origin of spawn_point
- Lidar sensor doesn't recognize map made by RoadRunner HOT 2
- Unable to record any carla_msgs HOT 1
- Use_sim_time HOT 1
- AttributeError: 'float' object has no attribute 'arctan2'
- [bridge-1] ModuleNotFoundError: No module named 'rclpy._rclpy'
- Argument list too long on build
- Rosbag replay error
- Map imports are inconsistent
- The frequency of the ros topic about the vehicle status sent by carla is too low
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 ros-bridge.