unitreerobotics / unitree_ros_to_real

107 stars 94 forks source link

How to access image data in Unitree A1 TX2? #63

Closed kenloumixx closed 1 year ago

kenloumixx commented 1 year ago

Hello,

I want to obtain image data from D435 camera in Unitree A1.

In specific, I saw some manuals from realsense-ros and I want to publish rostopic named as '/image/raw/...'

I installed realsense-ros, Librealsense2 and pyrealsense.

But when I turn on realsense-viewer in TX2, it shows no available camera options.

The result of lsusb is

unitree@nx:~/librealsense/scripts$ lsusb
Bus 002 Device 003: ID 8086:0b3a Intel Corp. 
Bus 002 Device 002: ID 0424:5744 Standard Microsystems Corp. 
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 0d8c:0012 C-Media Electronics, Inc. 
Bus 001 Device 005: ID 0424:2740 Standard Microsystems Corp. 
Bus 001 Device 008: ID 148f:7601 Ralink Technology, Corp. MT7601U Wireless Adapter
Bus 001 Device 007: ID 03f0:1b4a Hewlett-Packard 
Bus 001 Device 006: ID 046d:c52f Logitech, Inc. Unifying Receiver
Bus 001 Device 004: ID 1a40:0101 Terminus Technology Inc. Hub
Bus 001 Device 002: ID 0424:2744 Standard Microsystems Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

and the output of rs-enumerate-devices is

unitree@nx:~/librealsense/scripts$ rs-enumerate-devices
 08/06 13:21:38,985 ERROR [547757121856] (handle-libusb.h:95) failed to claim usb interface: 0, error: RS2_USB_STATUS_BUSY
Could not create device - failed to set power state . Check SDK logs for details

I've been struggling with this issue for a long time, looking for the manual about this camera module which I couldn't find out yet.

As an additional information, I can see the camera view of Unitree A1 using the mobile application, so I guess this issue is not related to the camera usb connection issue.

TIA

kenloumixx commented 1 year ago

According to the manual. when the output of rs-enumerate-devices is RS2_USB_STATUS_BUSY you can kill the process with the name RobotVision .