Open mgcho0608 opened 1 year ago
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).
cyber_monitor
command in another terminal to see if there is a topic like /apollo/sensor/camera/front_6mm/image/compressed
$ export GLOG_minloglevel=4 && cyber_bridge
and then provide the log of cyber_bridge
Thanks for your answer!
Note that my spec of local computer is NVIDIA GeForce RTX 3070 8GB GPU, 32GB * 2 memory, AMD Ryzen 7 5800X CPU.
$ export GLOG_alsologtostderr=1 && cyber_bridge
Thanks for your answer!
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_optgpu
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 :
import time from environs import Env import lgsvl
print("Python API Quickstart #22: Connecting to a bridge") env = Env()
sim = lgsvl.Simulator(env.str("LGSVLSIMULATOR_HOST", lgsvl.wise.SimulatorSettings.simulator_host), env.int("LGSVLSIMULATOR_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)
Notes: The above steps worked well in Apollo 7.0 and the same lgsvl simulator.
System information
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?