Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Carla camera data not showing in openpilot UI. Openpilot not working with Carla #22465

Closed
pgchui opened this issue Oct 7, 2021 · 5 comments
Closed
Labels
PC Issues related to running openpilot on PC

Comments

@pgchui
Copy link

pgchui commented Oct 7, 2021

Describe the bug
openpilot did not work with carla. openpilot UI did not show camera data. Client in carla did not move at all.

How to reproduce or log data
Console output:

Killing old publisher: roadCameraState
Traceback (most recent call last):
  File "./bridge.py", line 69, in cam_callback
    pm.send('roadCameraState', dat)
  File "/openpilot/cereal/messaging/__init__.py", line 248, in send
    self.sock[s].send(dat)
  File "cereal/messaging/messaging_pyx.pyx", line 149, in cereal.messaging.messaging_pyx.PubSocket.send
cereal.messaging.messaging_pyx.MultiplePublishersError

Steps to reproduce the behavior:

  1. follow steps in setup
  2. ./start_carla.sh
  3. ./start_openpilot_docker.sh

Additional context

Operating system: Ubuntu 20.04
NVIDIA-SMI: 470.63.01
CUDA Version: 11.4

@pgchui pgchui added the PC Issues related to running openpilot on PC label Oct 7, 2021
@jsee23
Copy link

jsee23 commented Oct 7, 2021

Also run into this yesterday. With #21241, a replay camera was introduced which is now the default camera, unless USE_FRAME_STREAM=1 is set when building openpilot with scons (on x86). So, when you run ./start_openpilot_docker.sh or ./launch_openpilot.sh, the replay camerad will start up and publish the front camera stream instead of the CARLA bridge.py.

@deanlee: was this intended to chance the default camera for the PC? If yes, should we then just set USE_FRAME_STREAM in Dockerfile.sim?

@adeebshihadeh
Copy link
Contributor

Yes, that was intentional. Fixed with 59c47f0.

@jwolffe
Copy link
Contributor

jwolffe commented Oct 7, 2021

The fix appears incomplete. Carla video appears in the UI, but hitting the 1 or 2 keys causes "openpilot Unavailable Communication Issue between Processes" message. Openpilot is still not working with Carla.

@pgchui
Copy link
Author

pgchui commented Oct 8, 2021

Adding USE_FRAME_STREAM=1 fixed the camera feed issue but new issue arose. After press 1, in console output of bridge.py, engaged changed from false to true. Right before the engaged value change, console printed:
carControl: Reader was evicted, reconnecting
controlsState: Reader was evicted, reconnecting
And openpilot UI showed "openpilot unavailable. Communication issue between processes."
Throttle, steer, and brake remained unchanged (0.0) no matter how many times key '1' was pressed.

@pgchui
Copy link
Author

pgchui commented Oct 8, 2021

@jwolffe I managed to fix the "Unavailable Communication Issue between Processes" by disabling line 254-260 in selfdrive/controlsd.py. I got this solution with the hints in

"communication issue between processes"
see github issue - #2501
disable the issue in controllerd:212 controlsd.py
- CARLA

Detailed steps:

  1. compile openpilot
git clone --recurse-submodules https://github.com/commaai/openpilot.git
cd openpilot/tools
./ubuntu_setup.sh
cd ..
./update_requirements.sh
USE_FRAME_STREAM=1 scons -j$(nproc)
  1. run Carla in Terminal 1
  2. run openpilot in Terminal 2
cd openpilot/tools/sim
./launch_openpilot.sh
  1. run bridge.py in Terminal 3
cd openpilot/tools/sim
./bridge.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PC Issues related to running openpilot on PC
Projects
None yet
Development

No branches or pull requests

4 participants