Skip to content

Commit

Permalink
Update CARLA and ROS Bridge compatibility note (#384)
Browse files Browse the repository at this point in the history
* Updated ros-bridge and carla compatibility note

* Merge branch 'master' of https://github.com/carla-simulator/ros-bridge into joel-mb/bridge_carla_compatibility

* Merge branch 'master' of https://github.com/carla-simulator/ros-bridge into joel-mb/bridge_carla_compatibility

* update to 0.9.10
  • Loading branch information
joel-mb committed Nov 2, 2020
1 parent e4f2de1 commit 9311dd8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This ROS package aims at providing a simple ROS bridge for CARLA simulator.

![rviz setup](./docs/images/ad_demo.png "AD Demo")

**This version requires CARLA 0.9.9.5**
**This version requires CARLA 0.9.10**

## Features

Expand Down
15 changes: 8 additions & 7 deletions carla_ros_bridge/src/carla_ros_bridge/bridge.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class CarlaRosBridge(object):
Carla Ros bridge
"""

CARLA_VERSION = "0.9.9"
CARLA_VERSION = "0.9.10"

def __init__(self, carla_world, params):
"""
Expand Down Expand Up @@ -586,16 +586,17 @@ def main():

# check carla version
dist = pkg_resources.get_distribution("carla")
if LooseVersion(dist.version) < LooseVersion(CarlaRosBridge.CARLA_VERSION):
if LooseVersion(dist.version) != LooseVersion(CarlaRosBridge.CARLA_VERSION):
rospy.logfatal("CARLA python module version {} required. Found: {}".format(
CarlaRosBridge.CARLA_VERSION, dist.version))
sys.exit(1)

if LooseVersion(carla_client.get_server_version()) < \
LooseVersion(CarlaRosBridge.CARLA_VERSION):
rospy.logfatal("CARLA Server version {} required. Found: {}".format(
CarlaRosBridge.CARLA_VERSION, carla_client.get_server_version()))
sys.exit(1)
if LooseVersion(carla_client.get_server_version()) != \
LooseVersion(carla_client.get_client_version()):
rospy.logwarn(
"Version mismatch detected: You are trying to connect to a simulator that might be incompatible with this API. Client API version: {}. Simulator API version: {}"
.format(carla_client.get_client_version(),
carla_client.get_server_version()))

carla_world = carla_client.get_world()

Expand Down

0 comments on commit 9311dd8

Please sign in to comment.