-
Notifications
You must be signed in to change notification settings - Fork 373
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document how to connect remotely #1342
Comments
I'm trying out Rerun for the first time and am struggling with this exact issue. Ultimately I'd like to stream data from a client to a Rerun server on a (potentially) different machine. I've created a new executable package which just contains this code to launch the viewer/server: use rerun::Session;
pub fn main() -> eyre::Result<()> {
let mut session = Session::init("arcade", true);
session.serve(true);
loop {}
} And then in my application code I initialise the session and connect to the server: let mut rerun = Session::init("arcade", true);
rerun.connect(SocketAddr::new(std::net::IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 9877)); And then later on I do some logging to Rerun: let pos = value.origin();
let _ = MsgSender::new(format!("robot"))
.with_component(&vec![Vec3D::new(pos.x as f32, pos.y as f32, pos.z as f32)])
.unwrap()
.send(&mut session); However, this isn't working. On the send side, I get these errors:
And on the receive side:
I couldn't find anything in the docs that covers this yet. A simple example would be a huge help! |
If you want to launch a viewer, just run See also: https://www.rerun.io/docs/reference/sdk-operating-modes |
This is now documented as the primary way of using Rust in https://www.rerun.io/docs/getting-started/logging-rust and it also has a small section at the end of https://www.rerun.io/docs/getting-started/logging-python |
I failed to find the docs for this |
|
A common use-case of Rerun is to do logging on one machine, and then viewing that log-data on another machine. This use-case is currently under-documented. It should be documented in
rerun --help
, in the API docs, and in our high-level docs.How you do it
The easiest way of doing it is to use the
serve()
API function, and the connecting to it with either the web-viewer or the native viewer.serve()
takes a single argument controlling whether or not to also open a browser on the same machine. You probably want to pass infalse
here, so callserve(false)
.serve(false)
will start two servers:.wasm
and.html
.These serves will shut-down when your logging app closes, so you may want to add a
sleep
at the end of your logging!You can then connect to the WebSocket-server using
rerun 127.0.0.1:9877
Example:
Run:
examples/python/objectron/main.py --serve
Connect with native viewer:
rerun 127.0.0.1:9877
Or use the web viewer with url http://127.0.0.1:9090/?url=ws://127.0.0.1:9877
Notes
serve()
will store all log messages in RAM until the process terminates. There is no eviction of old data yet.The text was updated successfully, but these errors were encountered: