Closed simon-TUM closed 1 year ago
Does it make a difference to performance if you insert a Keep() instruction immediately after the wait_for_frames() instruction?
frames = pipeline.wait_for_frames()
frames.keep()
@MartyG-RealSense The D435 actually does have an IR stream, and we're able to access it that way. However I'm now getting an "AttributeError: 'tuple' object has no attribute get_depth_frame". Do you know what the get_depth_frame() and get_color_frame() functions are trying to grab?
Printing frames gives me the tuple: (True, <pyrealsense2.frameset Z16 #2 @17164931112.23423 Y8 #1 @17164931112.23423>)
As the names suggest, get_depth_frame retrieves frames from the depth stream and get_color_frame retrieves frames from the color stream.
@MartyG-RealSense
Hi @freetown113 What is the docker run instruction that you are using, please? Have you tried using sudo admin permissions and including the --privileged flag? For example:
sudo docker run --privileged -it --rm \ -v /dev:/dev \
could you please have a look at this issue?
https://github.com/Kaivalya192/live-pose/issues/3#issue-2532217439
Also, this is the command I ran for starting the docker container on Ubuntu 22.04 X86:
2024-09-17 17:47:33 [mona@DOS live-pose]$ cat docker/run_container.sh
docker rm -f livepose
DIR=$(pwd)/
xhost + && docker run --gpus all --env NVIDIA_DISABLE_REQUIRE=1 -it --privileged --network=host --name livepose --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -v $DIR:$DIR -v /home:/home -v /mnt:/mnt -v /tmp/.X11-unix:/tmp/.X11-unix -v /tmp:/tmp -v /dev/bus/usb:/dev/bus/usb --ipc=host -e DISPLAY=${DISPLAY} -e GIT_INDEX_FILE livepose:latest bash -c "cd $DIR && bash"
@MartyG-RealSense got it fixed thanks a lot
Added -v /dev:/dev
after -v /dev/bus/usb:/dev/bus/usb
and now it is working.
Great news that you achieved a solution, @monajalal - thanks so much for the update and for sharing your solution!
ctx = rs.context() devices = ctx.query_devices() for dev in devices: dev.hardware_reset()
@MartyG-RealSense
I have same issue. the test code to check if works
$ cat test_rs_camera.py
import pyrealsense2 as rs
pipe = rs.pipeline()
print(pipe)
print(dir(pipe))
pipe.start()
print(pipe.get_active_profile())
pipe.stop()
$ python test_rs_camera.py
<pyrealsense2.pipeline object at 0xffffa00d25b0>
['__class__', '__delattr__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', 'get_active_profile', 'poll_for_frames', 'start', 'stop', 'try_wait_for_frames', 'wait_for_frames']
<pyrealsense2.pipeline_profile object at 0xffffa01085b0>
and I added these lines
and still get
pipeline_profile = config.resolve(pipeline_wrapper)
RuntimeError: No device connected
Hi @monajalal Does the script run if launched in sudo admin permissions mode?
sudo python3 test_rs_camera.py
In regard to the hardware_reset()
instruction, a hardware reset of the camera will disconnect the camera connection and then attempt to re-connect it. Sometimes the camera is not re-detected after the disconnection has occurred.
@MartyG-RealSense could you please check https://github.com/IntelRealSense/librealsense/issues/13437 I created an issue for this with full details thanks a lot
I will check https://github.com/IntelRealSense/librealsense/issues/13437 - thanks very much.
Issue Description
Hi, I'm having some troubles. The following lines give me an error when running:
The error message is:
I'm not sure what what the issue is. Realsense-viewer works and I've tried different cables but without success so far.