Hi everyone.
Is your feature request related to a problem? Please describe.
There is missing connection to Carla simulator or documentation how to do it.
Describe the solution you'd like
I would like to connect Carla with Baidu Apollo project. Solution which can use Carla ROS bridge (https://github.com/carla-simulator/ros-bridge).
Describe alternatives you've considered
There used to be some kind of bridge for older version of Carla from nemodrive (https://nemodrive-docs.readthedocs.io/projects/nemodrive-apollo/en/latest/index.html) but even this one didn't work perfectly.
Thank you
Hi @volprjir , can you tell us the version of Apollo you used?
From Apollo 3.5.0, we have changed the dependency from ApolloROS To CyberRT.
So, the ros-bridge may not work for CyberRT.
Thank you!
Hi @gruminions, to be honest, I'm not sure how to find out the version as when I click on Check Version button in Dreamview I get apolloauto/apollo:dev-x86_64-20180906_2002. But I used this repo:
https://github.com/nemodrive/apollo
I also tried to use official repo, but I'm not able to use the bridge there. Now I understand why as you mentioned CyberRT. Anyway, can you please help me how to connect the simulator with the last Apollo version, please?
Thank you
@gruminions: I'm currently in touch with person from Carla development team and he will support this connection from their side. Can you please let me know where can I find some kind of expected data format or data types so we can map Carla data to Apollo? Thank you
@gruminions: I'm currently in touch with person from Carla development team and he will support this connection from their side. Can you please let me know where can I find some kind of expected data format or data types so we can map Carla data to Apollo? Thank you
Hi, maybe you can refer to rosbag_to_record, a tool for converting data from rosbag to record.
You can know the format of most of the data from this tool.
@volprjir Hi, you can check LGSVL simulator which already supports connecting with Apollo 3.5. You can see the demo here. You can try it with their Apollo 3.5 fork.

Ok, now I know that I can use cyber_monitor for listening data. If I combine this tool with cyber Apollo demo I can se channels and messages. I'm wondering how can I send data to this connection with python script. How should I start?
@gruminions Is it possible to run two separate containers of 3.5 version on one computer for testing purposes? I suceeded to change ports, but it seems that both containers are still somehow connected, so if I run bootstrap.sh in one container, it tries to run bootstrap.sh in second container too (which fails)
@luqiang21 Thank you for the link. I'm able to send speed or percentage of steering wheel by python script from the apollo docker . I'm just trying to run this script out of docker so I'm able to sed the commands from Carla. Can you please help me with that?
@volprjir To send commands from outside docker, maybe you need to compile cyber outside which will be complicated. I don't have successful experience on this.
@luqiang21 Thanks for your help! I also want to run with carla.
@volprjir
I have run a python example outside of apollo docker. I run a script outside the docker:
python cyber/python/examples/listener.py
then start a talker inside the docker:
python cyber/python/examples/talker.py
I can success get connected but I receive this error below:
WARNING: Logging before InitGoogleLogging() is written to STDERR
I0423 11:29:35.165530 24978 global_data.cc:153] [cyber_py] host ip: 192.168.1.102
========================================================================================================================
E0423 11:29:35.766544 25002 segment.cc:233] [cyber_py] get shm failed.
E0423 11:29:35.766624 25002 segment.cc:85] [cyber_py] init failed, can't read now.
E0423 11:29:36.767777 25002 segment.cc:233] [cyber_py] get shm failed.
E0423 11:29:36.767860 25002 segment.cc:85] [cyber_py] init failed, can't read now.
E0423 11:29:37.769208 25002 segment.cc:233] [cyber_py] get shm failed.
E0423 11:29:37.769312 25002 segment.cc:85] [cyber_py] init failed, can't read now.
E0423 11:29:38.770581 25002 segment.cc:233] [cyber_py] get shm failed.
E0423 11:29:38.770668 25002 segment.cc:85] [cyber_py] init failed, can't read now.
I will try to solve it and try again.
add:
I finaly solve the problem follow this:
Then it works well, and can receive message.
Could we summarize the options to connect Apollo to Carla?
Is there any other option?
[Cyber C++ API] + [Carla C++ API]
This way should be better for debugging. We could move on Cyber Python API after this.
Because the attempt on Cyber Python API has not been successful. #7957
[Cyber C++ API] + [Carla python API], the server-client way like LGSVL Bridge, with a python wrapped C++ client or server at the Carla side.
@gruminions We decided to start with the bridge with Apollo 3.0 - using ROS. So we have a script which passes data from CARLA simulator to Apollo. There are speed, brake, throttle. GPS, Velodyne64 and Camera L modules are shinning green. Although we are not able to let Apollo drive car in CARLA. I'm pretty sure, there is a problem that CAN module is in UNKNOWN state. If I try to run Localization module, I'll get this in data/log/localization.out
E0502 13:22:14.038951 5268 msf_localization.cc:152] map: /apollo/modules/map/data/demo/local_map E0502 13:22:14.039369 5268 msf_localization.cc:153] lidar_extrin: modules/localization/msf/params/velodyne_params/velodyne64_novatel_extrinsics_example.yaml E0502 13:22:14.039381 5268 msf_localization.cc:154] lidar_height: modules/localization/msf/params/velodyne_params/velodyne64_height.yaml E0502 13:22:14.040738 5268 msf_localization.cc:221] Ant imu lever arm file: modules/localization/msf/params/gnss_params/ant_imu_leverarm.yaml F0502 13:22:14.044245 5268 localization_lidar.cc:58] Reflectance map folder is invalid! Check failure stack trace: [ WARN] [1556796132.973815682]: transport file: /home/tmp/ros/etc/ros/transport_mode.yaml is not map [ WARN] [1556796132.973893887]: Parse transport_mode file failed
and for perception this:
[NVBLAS] NVBLAS_CONFIG_FILE environment variable is NOT set : relying on default config filename 'nvblas.conf'
[NVBLAS] Cannot open default config file 'nvblas.conf'
[NVBLAS] Config parsed
[NVBLAS] CPU Blas library need to be provided
F0502 13:23:18.427935 9710 syncedmem.hpp:18] Check failed: error == cudaSuccess (38 vs. 0) no CUDA-capable device is detected
Check failure stack trace:
planning.ERROR
E0502 14:15:06.538234 29635 reference_line_provider.cc:604] Failed to create reference line from routing
E0502 14:15:06.538251 29635 reference_line_provider.cc:198] Fail to get reference line
E0502 14:15:06.538362 29635 pnc_map.cc:515] failed to get lane from point x: -81.769532174508768 y: 30.216548593355142 z: 0
E0502 14:15:06.539947 29635 pnc_map.cc:180] Failed to get waypoint from routing with point: (-81.7695, 30.2165, 0)
E0502 14:15:06.540004 29635 pnc_map.cc:434] Failed to update vehicle state in pnc_map
E0502 14:15:06.540022 29635 reference_line_provider.cc:550] Failed to extract segments from routing
Can you please help us how to let Apollo drive?
Most helpful comment
@volprjir Hi, you can check LGSVL simulator which already supports connecting with Apollo 3.5. You can see the demo here. You can try it with their Apollo 3.5 fork.
