You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Following this tutorial, I created a simple program to get frames from another PC.
I compiled librealsenses from master (2.48.0) with the flags -DBUILD_NETWORK_DEVICE=ON -DFORCE_RSUSB_BACKEND=ON on two pc.
I start rs-server on one of the pc.
The realsense-viewer is able to connect and display the image from the other pc.
The program works when run on the same pc as rs-server.
But when the program is run on the other pc, it is only able to retrieve metadata about the camera (serial number, name...).
I get the following error message when calling start on the pipeline :
terminate called after throwing an instance of 'rs2::error'
what(): No device connected
The two pc were at first just part of the same wifi, but connecting them using an ethernet cable did not change the behavior.
What could be the cause of the problem ?
Here is the program
#include<librealsense2/rs.hpp>
#include<librealsense2-net/rs_net.hpp>
#include<librealsense2/h/rs_pipeline.h>
#include<iostream>usingnamespacestd;intmain()
{
rs2::net_device dev("ip");
rs2::context ctx;
dev.add_to(ctx);
/* Metadata from context */auto g = ctx.query_devices();
string serial_number;
for (auto t : g)
{
auto name = rs2_camera_info::RS2_CAMERA_INFO_NAME;
auto info = t.get_info(name);
auto info_descriptor = rs2_camera_info_to_string(name);
cout << info_descriptor << " : " << info << endl;
name = rs2_camera_info::RS2_CAMERA_INFO_SERIAL_NUMBER;
info = t.get_info(name);
info_descriptor = rs2_camera_info_to_string(name);
cout << info_descriptor << " : " << info << endl;
serial_number= info;
}
/* Starting pipeline */
rs2::pipeline p(ctx);
rs2::config cfg;
cfg.enable_device(serial_number);
cfg.enable_stream(RS2_STREAM_COLOR, 0);
p.start(cfg);
while(true) {
p.wait_for_frames();
}
}
The text was updated successfully, but these errors were encountered:
Hi @Lblenner There is a past rs-server C++ case in the link below that had problems with starting the pipeline when a cfg custom configuration was used (the script worked when 'cfg' was removed from the brackets of the pipe start instruction).
When cfg was included in their script, it worked when the camera was connected directly to the host machine but not when the camera was connected to the remote machine and the script was launched from the host machine.
The problem in that particular case was found to be with the cfg definition for the color stream. The instruction below worked for them:
Issue Description
Following this tutorial, I created a simple program to get frames from another PC.
I compiled librealsenses from master (2.48.0) with the flags
-DBUILD_NETWORK_DEVICE=ON
-DFORCE_RSUSB_BACKEND=ON
on two pc.I start
rs-server
on one of the pc.The
realsense-viewer
is able to connect and display the image from the other pc.The program works when run on the same pc as
rs-server
.But when the program is run on the other pc, it is only able to retrieve metadata about the camera (serial number, name...).
I get the following error message when calling
start
on the pipeline :The two pc were at first just part of the same wifi, but connecting them using an ethernet cable did not change the behavior.
What could be the cause of the problem ?
Here is the program
The text was updated successfully, but these errors were encountered: