How to run bridge with aem in apollo 8.0?
System information
- OS Platform and Distribution : Linux Ubuntu 18.04:
- Apollo installed from aem:
- Apollo version 8.0:
I previously used Apollo version 7.0 with docker, and now I am attempting to utilize version 8.0 for its improved end-to-end planning capabilities. However, I am struggling to find the proper method for running cyber_bridge with the aem tool. In version 7.0, I executed the python code after performing the following steps: 1. dev_start.sh, 2. dev_into.sh, 3. bootstrap_lgsvl.sh, and 4. bridge.sh. After reviewing the documentation, I discovered that the first three steps should be replaced with 1. aem start, 2. aem enter, and 3. aem bootstrap. Unfortunately, I was unable to locate the aem bridge. Any suggestions?
In apollo 8.0, You need to perform the following action:
# update repositories
sudo apt update
# download drivers and cyber bridge module
$ sudo apt install apollo-neo-drivers-dev apollo-neo-cyber-bridge-dev
# start image_decompress component
$ nohup cyber_launch start /opt/apollo/neo/packages/drivers-dev/latest/addition_data/tools/image_decompress/launch/image_decompress.launch &
# start cyber bridge
$ cyber_bridge
@WildBeast114514 Thanks for your answer! I followed your instructions and observed that tcp 8888, 9090 port were connected.

Unfortunately, I got two new issues.
-
According to your answer, I should start image_decompress component before starting cyber bridge. However, I need another terminal to start cyber bridge as the image_decompress terminal was not usable (even '&' was at the end). I'm not sure this works in a right way.

-
As shown in the first screenshot, even though the tcp port of autopilot and dreamview were connected, any messages were not transmitted through the connection (Obviously, the car didn't move at all).
- It looks like the image_decompress component is working properly, you can use the
cyber_monitorcommand in another terminal to see if there is a topic like/apollo/sensor/camera/front_6mm/image/compressed - What did you do after running cyber_bridge? To further confirm the cause, please enter the following command to start cyber_bridge:
$ export GLOG_minloglevel=4 && cyber_bridge
and then provide the log of cyber_bridge
Thanks for your answer!
- I used cyber_monitor but couldn't find topic like /apollo/sensor/camera/front_6mm/image/compressed.

- Unfortunately, 'export GLOG_minloglevel=4 && cyber_bridge' makes segmentation fault, while 'cyber_bridge' does not.

Note that my spec of local computer is NVIDIA GeForce RTX 3070 8GB GPU, 32GB * 2 memory, AMD Ryzen 7 5800X CPU.
- try "ctrl+d" to turn down the page of cyber_montor
- sorry for that mistake, the command should be:
$ export GLOG_alsologtostderr=1 && cyber_bridge
Thanks for your answer!
- Oh, I got it. I found the compressed topics and it works when I run the python code through lgsvl simulator (while other topics not working...)

- Here is the result log with the command.

This is the log right after entering the command.

After I run the simulator, this kind of logs repeated until I finished the simulation.
For 2, it seems the autopilot server couldn't receive messages for desired topics. But it is strange that I could check the lgsvl simulator publishing messages for those topics in a right way.

I had the similar issue and I built the apollo 8.0 from source code (I did it like 7.0, and this was mentioned in Apollo 8.0 guide document). No message watched from Apollo in cyber_monitor, but the sensor data messages from simulator (lgsvl) could be watched in cyber_monitor. Is there any suggestion or clues?
cyber_bridge receives the following types of messages from the socket connection, namely OP_REGISTER_DESC, OP_ADD_READER, OP_ADD_WRITER and OP_PUBLISH
According to the log, it looks like the lgsvl simulator has been sending messages of type OP_PUBLISH to cyber_bridge.
Before processing the OP_PUBLISH messages, cyber_bridge need to receive OP_ADD_WRITER messages to add the corresponding writer to the topic.
As the cyber_bridge code has not been changed since 6.0, I wonder if this is only the case in apollo 8.0?
If so, can you provide us with the detailed steps to follow after starting cyber_bridge so that we can further investigate the cause of this situation?
-
I built Apollo with the following command: git clone https://github.com/ApolloAuto/apollo.git cd ~/apollo bash docker/scripts/dev_start.sh bash docker/scripts/dev_into.sh bash apollo.sh build_opt_gpu_
-
Run Apollo in another terminal cd ~/apollo bash docker/scripts/dev_into.sh bash scripts/bootstrap.sh bash scripts/bootstrap_lgsvl.sh bash scripts/bridge.sh
-
Run the lgsvl simulator in another terminal and select “Python API" for run
-
Run the lgsvl Python script to start lgsvl simulator, pls review the following script :
#!/usr/bin/env python3
import time from environs import Env import lgsvl
print("Python API Quickstart #22: Connecting to a bridge") env = Env()
sim = lgsvl.Simulator(env.str("LGSVL__SIMULATOR_HOST", lgsvl.wise.SimulatorSettings.simulator_host), env.int("LGSVL__SIMULATOR_PORT", lgsvl.wise.SimulatorSettings.simulator_port)) if sim.current_scene == lgsvl.wise.DefaultAssets.map_borregasave: sim.reset() else: sim.load(lgsvl.wise.DefaultAssets.map_borregasave)
spawns = sim.get_spawn()
state = lgsvl.AgentState() state.transform = spawns[0] ego = sim.add_agent(env.str("LGSVL__VEHICLE_0", lgsvl.wise.DefaultAssets.ego_lincoln2017mkz_apollo5_full_analysis), lgsvl.AgentType.EGO, state)
print("Bridge connected:", ego.bridge_connected)
ego.connect_bridge(env.str("LGSVL__AUTOPILOT_0_HOST", lgsvl.wise.SimulatorSettings.bridge_host), env.int("LGSVL__AUTOPILOT_0_PORT", lgsvl.wise.SimulatorSettings.bridge_port))
print("Waiting for connection...")
while not ego.bridge_connected: time.sleep(1)
print("Bridge connected:", ego.bridge_connected) print("Running the simulation for 30 seconds")
sim.run(1800)
- I got the same result with ”mgcho0608“
Notes: The above steps worked well in Apollo 7.0 and the same lgsvl simulator.
cyber_bridge.log: Cannot find proto descriptor for message type apollo.perception.TrafficLightDetection Cannot find proto descriptor for message type apollo.localization.CorrectedImu Cannot find proto descriptor for message type apollo.drivers.gnss.Imu Cannot find proto descriptor for message type apollo.drivers.gnss.InsStat Cannot find proto descriptor for message type apollo.localization.Gps Cannot find proto descriptor for message type apollo.drivers.gnss.GnssBestPose
May be related to proto version, cyber_bridge can not find these datatypes