PlotJuggler icon indicating copy to clipboard operation
PlotJuggler copied to clipboard

Unable to subscribe for ZMQ messages after the move to msqg

Open blue-genie opened this issue 1 year ago • 0 comments

Thanks for contributing to PlotJuggler. You are great!

Problem description

The move from cereal to msgq, and changes performed in msgq at that time, seems to have broken the streaming functionality in PJ.

Steps to reproduce (important)

  • start ./cereal/messaging/bridge on c3x
  • start PJ with the command ZMQ=1 ./juggle.py --stream
  • in PJ click on Start under Cereal Subscriber, provide the IP of the c3x, and pick the right DBC file.
  • Note that no messages are received.

#Root Cause:

Method static int get_port(std::string endpoint) { in messaging/impl_zmq.cc changed and calculates the endpoint port in a different way.

https://github.com/commaai/msgq/commit/6d2cc6e22229a9c855d8474e5643b26fbf2b5976#diff-f1d0983453654eb5af781df8745548f20a33103f40c30cd502d2593997954085R11

#Hackish solution

  • After the submodules are pulled update the logic in the get_port method to the new logic and rebuild PJ - I used build.sh to rebuild.
  • After build copy libDataStreamCereal.so from PlotJuggler/build/bin/ to openpilot/tools/plotjuggler/bin/
  • Follow the steps from Steps to reproduce and note that now the messages are streamed to PJ.

blue-genie avatar Jun 25 '24 15:06 blue-genie