[Unitree Go2] std::bad_alloc Error in qre_go2-foxy-nvidia

Hi everyone,

I’m setting up the qre_go2-foxy-nvidia workspace to connect to the GO2 robot, but I’m running into a memory allocation issue. After connecting to the robot and getting Cyclone DDS running, I receive the following error:

bad_alloc caught: std::bad_alloc

Once this error occurs, memory usage spikes until all swap space is filled, and then the process crashes. I’ve tested this on two different systems (both running Ubuntu 20.04.6) with the same result. I’m using CycloneDDS version 0.10.2 in a separate workspace, and the qre-platform service seems to be functioning correctly.

Setup details:

  • OS: Ubuntu 20.04.6
  • CycloneDDS Version: 0.10.2
  • Issue: Memory usage increases significantly after starting the Cyclone DDS connection, eventually crashing the process.

Has anyone else experienced this or have any ideas on how to troubleshoot? Any suggestions would be greatly appreciated!

Thanks!

Dear @hasarinduperera,

The issue is that the data coming from the Unitree uses custom cyclone_dds, to enable it to run you have to build the go2 using unitrees custom cyclone dds. The instructions for build are given in the qre_go2 readme.

This will fix the issue.

Cheers,
S. O. Sohail

To connect to the robot you can use the foxy or humble branch, both will work fine as well. The foxy-nvidia is specifically for the go2’s nvidia pc.