Skip to content

Trouble Transferring Image Data to Onboard Raspberry Pi on Unitree Go1 Edu #9

@pannatorn6395

Description

@pannatorn6395

I'm currently working on transferring image data from multiple Jetson units to the onboard Raspberry Pi of the Unitree Go1 Edu robot. I've been following the guide available here, specifically Step 7, using ./bins/example_putImagetrans for sending the image data.

The data transfer works well between the Jetson units (with IPs: 192.168.123.13, 192.168.123.14, and 192.168.123.15). However, I've encountered issues when attempting to transfer this image data to the Go1 Edu's onboard Raspberry Pi (IP: 192.168.123.161) using the following Python script to receive the data.

`
import cv2

class camera:

def __init__(self, cam_id=None, width=640, height=480):
    self.width = 640
    self.cam_id = cam_id
    self.width = width
    self.height = height
def get_img(self):
    IpLastSegment = "161"
    cam = self.cam_id
    udpstrPrevData = "udpsrc address=192.168.123." + IpLastSegment + " port="
    udpPORT = [9201, 9202, 9203, 9204, 9205]
    udpstrBehindData = " ! application/x-rtp,media=video,encoding-name=H264 ! rtph264depay ! h264parse ! avdec_h264 ! videoconvert ! appsink"
    udpSendIntegratedPipe_0 = udpstrPrevData + str(udpPORT[cam - 1]) + udpstrBehindData
    print(udpSendIntegratedPipe_0)
    self.cap = cv2.VideoCapture(udpSendIntegratedPipe_0)

def demo(self):
    self.get_img()
    while True:
        self.ret, self.frame = self.cap.read()
        self.frame = cv2.resize(self.frame, (self.width, self.height))
        if self.cam_id == 1:
            self.frame = cv2.flip(self.frame, -1)
        if self.frame is not None:
            cv2.imshow("video0", self.frame)
        if cv2.waitKey(2) & 0xFF == ord('q'):
            break
    self.cap.release()
    cv2.destroyAllWindows()

`
Despite adjusting the destination IP to the onboard Raspberry Pi's, the image data doesn't seem to get through as expected.

Any guidance or troubleshooting steps would be highly appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions