IntelRealSense / librealsense

Intel® RealSense™ SDK
https://www.intelrealsense.com/
Apache License 2.0
7.61k stars 4.83k forks source link

Create a sensor from Software_device who can not call Run and Open function #7926

Closed DragonDeux closed 3 years ago

DragonDeux commented 3 years ago

Required Info
Camera Model { R200 / F200 / SR300 / ZR300 / D400 }
Firmware Version (Open RealSense Viewer --> Click info)
Operating System & Version {Win (8.1/10) / Linux (Ubuntu 14/16/17) / MacOS
Kernel Version (Linux Only) (e.g. 4.14.13)
Platform PC/Raspberry Pi/ NVIDIA Jetson / etc..
SDK Version { legacy / 2.<?>.<?> }
Language {C/C#/labview/nodejs/opencv/pcl/python/unity }
Segment {Robot/Smartphone/VR/AR/others }

Issue Description

<Describe your issue / question / feature request / etc..>

DragonDeux commented 3 years ago

Dear Realsense engineers:

I'm trying to sync non-realsense RGB device with Realsense Lidar L515 device by following code:

sync = rs.syncer
colorSensor = rs.software_device().add_sensor("Color")
balserColorSensor.open(color_stream)
balserColorSensor.start(sync)

error: AttributeError: 'pyrealsense2.pyrealsense2.software_sensor' object has no attribute 'open'

Btw, i have inspired this kind of code with :https://github.com/IntelRealSense/librealsense/blob/master/examples/software-device/rs-software-device.cpp which is coded in C++, i thought it would work bec it is Realsense official sample.

Can anyone please help to resolve this issue?

Thanks in advance

RealSenseSupport commented 3 years ago

Hi,

Will you be needing further help with this? While we cannot assist with 3rd party sensors, we tested the latest rs-software-device.cpp example and it appears to be working as expected. As an aside I see you are getting a python error. The python wrapper may not be implementing the exact interface available in the CPP SDK so we'd recommend using the API directly to avoid such potential issues.

Thanks

FYI if we don’t hear from you in 7 days, this issue will be closed.