erdos-project / erdos Goto Github PK
View Code? Open in Web Editor NEWDataflow system for building self-driving car and robotics applications.
Home Page: https://erdos.readthedocs.io
License: Apache License 2.0
Dataflow system for building self-driving car and robotics applications.
Home Page: https://erdos.readthedocs.io
License: Apache License 2.0
Some imports are duplicates, e.g. erdos::dataflow::operators::Operator
and erdos::dataflow::Operator
.
Only 1 path per object is simpler (this likely will impact #110).
ERDOS currently cannot distributed operators across several machines when it is using ROS as a back-end. We can't use several machines because we do not create launch files, but instead we spawn ROS nodes in processes we manage.
The ROS publisher and subscriber API expects users to specify queue sizes and buffers sizes. Users are expected to provide a buffer size that is greater than the size of all messages in the queue. Otherwise, ROS drops messages.
Update ros_output_data_stream.py
to automatically compute the size of the buffer based on the size of the queues.
Modules, structures, and functions like InternalReadStream
are public when they should be private. We should fix this as users don't need to know about private objects.
More info here:
https://doc.rust-lang.org/reference/visibility-and-privacy.html
ERDOS serializes ROS messages into strings in order to be able to send ROS messages without requiring users to specify ROS message files. However, this solution adds significant performance overhead because each message is pickled and unpickled.
The operator computes the mIoU in the callback registered on the fusion output stream. However, in certain situations ground truth may not be available by the time the callback is invoked.
Hi, thanks for your great work. I may need some help.
I tried to use the deadline control in one operator. I followed the full_pipeline example: implement setup func for SqureOperator, and in the function, invoke ctx.add_deadline to set a deadline for the operator. However, it is useless to do so. The deadline handler doesn't work.
I read the source code and find the reason is in arm_deadlines function. Take src/node/operator_executors/one_in_one_out_executor.rs as an example. The arm_deadlines func only creates a DeadlineEvent when the deadline.get_constrained_read_stream_ids is not empty. However, the deadline's constrained_read_stream(TimestampDeadline.read_stream_ids) is always empty. The only way to insert a read_strem_id is by invoking the on_read_stream func of TimestampDeadline, but on_read_stream is not invoked during the running of full_pipeline.
I solved the problem(deadline control does not work) by making the following changes to ctx.add_deadline in full_pipeline.rs:
ctx.add_deadline(TimestampDeadline::new(
move |_s: &(), _t: &Timestamp| -> Duration { Duration::new(2, 0) },
|_s: &(), _t: &Timestamp| {
tracing::info!("SquareOperator @ {:?}: Missed deadline.", _t);
},
).on_read_stream(ctx.get_read_stream_ids()[0]));
To achieve this, I have to make get_read_stream_ids pub.
I dont know if I am right. Please give me an example of how to add_deadline correctly. I appreciate your help. Thanks!
Dear Author,
I saw the paper "Time Constraints and Fault Tolerance in Autonomous Driving Systems
". It's very impressive to see such excellent analyzing on problems of AD! But at last the paper doesn't get the solution to prevent time constraint violation.
Now after several months, have you found a way to solve time constraints? I thought about it before and regard time-trigger as a solution but it lacks flexibility. Looking forward to your reply, thank you.
Best Wishes.
To use ERDOS for a simple dataflow, users currently need to do the following:
use erdos::{
self,
dataflow::{
message::*,
operators::{JoinOperator, MapOperator},
stream::{ExtractStream, IngestStream, WriteStreamT},
Operator, OperatorConfig, ReadStream, WriteStream,
},
};
This should be simplified to use erdos::prelude::*
to cover the essential imports, like in other libraries.
The scripts we have in tests
are not integration tests. We should convert:
communication_patterns_test.py
into an integration test in which we send n messages, and check that they are received. We should still test the different cases: 1-1, 1-2, 2-1.control_loop_test.py
into an integration tests that sends n messages in a loop.ros_integration_tests.py
into integration tests that check if ROSPublisherOp and ROSSubscriberOp work correctly.I'm new for erdos, and I'm using README for installation and demo,
I've already done this
rustup default nightly # use nightly Rust toolchain
git clone https://github.com/erdos-project/erdos.git && cd erdos
and simple works fine,
python3 python/examples/simple_pipeline.py
But I'm stuck at
python3 python/setup.py develop
the error info is
running develop
running egg_info
writing python/erdos.egg-info/PKG-INFO
writing dependency_links to python/erdos.egg-info/dependency_links.txt
writing requirements to python/erdos.egg-info/requires.txt
writing top-level names to python/erdos.egg-info/top_level.txt
writing manifest file 'python/erdos.egg-info/SOURCES.txt'
running build_ext
running build_rust
error: can't find Rust compiler
If you are using an outdated pip version, it is possible a prebuilt wheel is available for this package but pip is not able to install from it. Installing from the wheel would avoid the need for a Rust compiler.
To update pip, run:
pip install --upgrade pip
and then retry package installation.
If you did intend to build this package from source, try installing a Rust compiler from your system package manager and ensure it is on the PATH during installation. Alternatively, rustup (available at https://rustup.rs) is the recommended way to download and update the Rust compiler toolchain.
My host machine info:
Linux cluster01 4.15.0-112-generic #113~16.04.1-Ubuntu SMP Fri Jul 10 04:37:08 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
I've double check the requirements packges, reinstall pip but still the same error
Any suggestion? many thanks advance.
If multiple operators publish on data streams with the same name, then streams leak data from each other.
The bug occurs because we do not anonymize stream names. When we use ROS as a back-end, we use the non-anonymized name to denote a ROS topic, and thus many operators can publish on the same topic. When we use Ray as a back-end, we use the non-anonymized stream.name
to build several auxiliary data structures, and as a result we clash stream.
This behavior can be reproduces with tests/stream_name_clash.py
.
On Python 3.8+, ERDOS should use multiprocessing.shared_memory
for nodes on the same machine to avoid serialization overhead.
We started seeing the following error while linking after restructuring the project layout in #189.
The error is as follows:
note: Undefined symbols for architecture x86_64:
"_PyList_Append", referenced from:
pyo3::types::list::PyList::append::_$u7b$$u7b$closure$u7d$$u7d$::hb3ee2e9f284d525d in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.11.rcgu.o)
"_PyBytes_FromStringAndSize", referenced from:
pyo3::types::bytes::PyBytes::new::h2346bc142757f449 in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.10.rcgu.o)
"_PyGILState_Release", referenced from:
_$LT$pyo3..gil..GILGuard$u20$as$u20$core..ops..drop..Drop$GT$::drop::h0875490cce98b755 in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.8.rcgu.o)
"_Py_IsInitialized", referenced from:
pyo3::gil::GILGuard::acquire::_$u7b$$u7b$closure$u7d$$u7d$::hd3c8560dc835bafa in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.8.rcgu.o)
"_PyExc_ValueError", referenced from:
_$LT$pyo3..exceptions..PyValueError$u20$as$u20$pyo3..type_object..PyTypeInfo$GT$::type_object_raw::h203baf438139c41f in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.0.rcgu.o)
"_PyEval_ThreadsInitialized", referenced from:
pyo3::gil::GILGuard::acquire::_$u7b$$u7b$closure$u7d$$u7d$::hd3c8560dc835bafa in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.8.rcgu.o)
"_PyExc_RuntimeError", referenced from:
_$LT$pyo3..exceptions..PyRuntimeError$u20$as$u20$pyo3..type_object..PyTypeInfo$GT$::type_object_raw::h5d98c20758e049cf in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.0.rcgu.o)
"_PyExc_OverflowError", referenced from:
_$LT$pyo3..exceptions..PyOverflowError$u20$as$u20$pyo3..type_object..PyTypeInfo$GT$::type_object_raw::h1264959a788b625e in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.0.rcgu.o)
"_PyExc_AttributeError", referenced from:
_$LT$pyo3..exceptions..PyAttributeError$u20$as$u20$pyo3..type_object..PyTypeInfo$GT$::type_object_raw::h444faae03f915602 in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.0.rcgu.o)
"_PyExc_BaseException", referenced from:
_$LT$pyo3..exceptions..PyBaseException$u20$as$u20$pyo3..type_object..PyTypeInfo$GT$::type_object_raw::hf9a5e6af9086ad35 in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.0.rcgu.o)
"_PyNumber_Index", referenced from:
pyo3::types::num::_$LT$impl$u20$pyo3..conversion..FromPyObject$u20$for$u20$u64$GT$::extract::h98d5978ac258bae4 in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.15.rcgu.o)
"_PySequence_Check", referenced from:
_$LT$pyo3..types..sequence..PySequence$u20$as$u20$pyo3..conversion..PyTryFrom$GT$::try_from::h2dc65b78675b0ceb in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.15.rcgu.o)
"_PyGILState_Ensure", referenced from:
pyo3::gil::GILGuard::acquire_unchecked::hc686c27195a27bb3 in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.8.rcgu.o)
"_PyCFunction_NewEx", referenced from:
pyo3::types::function::PyCFunction::internal_new_from_pointers::h3dfba0bb2114f4ef in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.15.rcgu.o)
"_PyErr_Print", referenced from:
pyo3::err::panic_after_error::hf97c212b8c021511 in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.15.rcgu.o)
"_PyErr_NormalizeException", referenced from:
pyo3::err::PyErr::normalized::h40e8f4bd4677a4be in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.15.rcgu.o)
"_PyErr_GivenExceptionMatches", referenced from:
pyo3::err::PyErr::is_instance::h6d8c078c385141c4 in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.15.rcgu.o)
"_PyErr_PrintEx", referenced from:
pyo3::err::PyErr::take::h5624bb2bfe614f3f in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.15.rcgu.o)
pyo3::err::PyErr::print::h94540702bdf29637 in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.15.rcgu.o)
"_PyObject_Str", referenced from:
pyo3::types::any::PyAny::str::hc6e5d7ce429ff947 in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.7.rcgu.o)
"_PyObject_Repr", referenced from:
pyo3::types::any::PyAny::repr::h2e828644f171a29c in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.7.rcgu.o)
"_PyObject_SetAttrString", referenced from:
pyo3::type_object::initialize_tp_dict::h85474ffa22186f1c in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.9.rcgu.o)
"_PyLong_AsUnsignedLongLong", referenced from:
pyo3::types::num::_$LT$impl$u20$pyo3..conversion..FromPyObject$u20$for$u20$u64$GT$::extract::h98d5978ac258bae4 in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.15.rcgu.o)
"_PyBool_Type", referenced from:
pyo3::ffi::boolobject::PyBool_Check::he43343da1f685b26 in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.7.rcgu.o)
"_PyImport_AddModule", referenced from:
pyo3::python::Python::run_code::hcdebb70890cc601b in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.3.rcgu.o)
"_PyUnicode_FromStringAndSize", referenced from:
pyo3::types::string::PyString::new::ha54147c354b58f93 in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.13.rcgu.o)
"_PyObject_GenericSetDict", referenced from:
pyo3::pyclass::push_dict_getset::h1f5b8f42adcfeda9 in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.14.rcgu.o)
"_PyDict_New", referenced from:
pyo3::types::dict::PyDict::new::he5971f940984fcf9 in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.6.rcgu.o)
"_PyBaseObject_Type", referenced from:
_$LT$pyo3..types..any..PyAny$u20$as$u20$pyo3..type_object..PyTypeInfo$GT$::type_object_raw::h8201a6fbce7cd3d2 in erdos_python.252pvga0nl19qj44.rcgu.o
_$LT$pyo3..pyclass_init..PyNativeTypeInitializer$LT$T$GT$$u20$as$u20$pyo3..pyclass_init..PyObjectInit$LT$T$GT$$GT$::into_new_object::h8e220cd96ee46e30 in erdos_python.2ze6cujhuouzjoit.rcgu.o
_$LT$pyo3..pycell..PyCellBase$LT$U$GT$$u20$as$u20$pyo3..pycell..PyCellLayout$LT$T$GT$$GT$::tp_dealloc::h17cb07af0edd0e70 in erdos_python.xm8924r44o4qwn0.rcgu.o
"_PyImport_Import", referenced from:
pyo3::types::module::PyModule::import::h12ce7f05bb31e648 in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.2.rcgu.o)
"__Py_Dealloc", referenced from:
pyo3::ffi::object::Py_DECREF::hd1cf0d0adcd38b6f in erdos_python.flqabfgcxz43r2.rcgu.o
pyo3::ffi::object::Py_DECREF::h1249eddce9b41e89 in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.15.rcgu.o)
"_PyIter_Next", referenced from:
_$LT$$RF$pyo3..types..iterator..PyIterator$u20$as$u20$core..iter..traits..iterator..Iterator$GT$::next::h26f75ab62926198b in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.2.rcgu.o)
"__Py_NoneStruct", referenced from:
pyo3::ffi::object::Py_None::h4bb72b47c0c5129b in erdos_python.flqabfgcxz43r2.rcgu.o
pyo3::ffi::object::Py_None::h32f1dc2ca1a0868c in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.15.rcgu.o)
"_PyType_IsSubtype", referenced from:
pyo3::ffi::object::PyObject_TypeCheck::h3da3a145cdfbe1b5 in erdos_python.flqabfgcxz43r2.rcgu.o
"_PyEval_SaveThread", referenced from:
pyo3::python::Python::allow_threads::h105c4d9ad13befb9 in erdos_python.47v7y8yi72iy0ab7.rcgu.o
pyo3::python::Python::allow_threads::h69605b42ca1ef95b in erdos_python.47v7y8yi72iy0ab7.rcgu.o
pyo3::python::Python::allow_threads::h7824bca5b6f5f49d in erdos_python.47v7y8yi72iy0ab7.rcgu.o
pyo3::python::Python::allow_threads::hfd1a779d7cdd9773 in erdos_python.47v7y8yi72iy0ab7.rcgu.o
"_PyObject_Free", referenced from:
pyo3::pyclass::tp_init_additional::h07f065dc15e0fac8 in erdos_python.bisr1ua0raercj2.rcgu.o
pyo3::pyclass::tp_init_additional::h0a1fb2a3f3c89217 in erdos_python.bisr1ua0raercj2.rcgu.o
pyo3::pyclass::tp_init_additional::h1a0fe46809097c9c in erdos_python.bisr1ua0raercj2.rcgu.o
pyo3::pyclass::tp_init_additional::h2ebe2ca40cef899e in erdos_python.bisr1ua0raercj2.rcgu.o
pyo3::pyclass::tp_init_additional::h9383fcab93ae7dbd in erdos_python.bisr1ua0raercj2.rcgu.o
pyo3::pyclass::tp_init_additional::h9bab9da1bcf38e80 in erdos_python.bisr1ua0raercj2.rcgu.o
pyo3::pyclass::tp_init_additional::hbf26ca353ae9dd4a in erdos_python.bisr1ua0raercj2.rcgu.o
...
"_PyObject_GetIter", referenced from:
pyo3::types::iterator::PyIterator::from_object::h76aed69c8e87d3de in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.2.rcgu.o)
"_PyDict_Next", referenced from:
_$LT$pyo3..types..dict..PyDictIterator$u20$as$u20$core..iter..traits..iterator..Iterator$GT$::next::h4cd638da7f9214e0 in erdos_python.4w86bcgc2lc4wulx.rcgu.o
"_PyObject_Malloc", referenced from:
pyo3::pyclass::tp_init_additional::h07f065dc15e0fac8 in erdos_python.bisr1ua0raercj2.rcgu.o
pyo3::pyclass::tp_init_additional::h0a1fb2a3f3c89217 in erdos_python.bisr1ua0raercj2.rcgu.o
pyo3::pyclass::tp_init_additional::h1a0fe46809097c9c in erdos_python.bisr1ua0raercj2.rcgu.o
pyo3::pyclass::tp_init_additional::h2ebe2ca40cef899e in erdos_python.bisr1ua0raercj2.rcgu.o
pyo3::pyclass::tp_init_additional::h9383fcab93ae7dbd in erdos_python.bisr1ua0raercj2.rcgu.o
pyo3::pyclass::tp_init_additional::h9bab9da1bcf38e80 in erdos_python.bisr1ua0raercj2.rcgu.o
pyo3::pyclass::tp_init_additional::hbf26ca353ae9dd4a in erdos_python.bisr1ua0raercj2.rcgu.o
...
"_PyObject_SetAttr", referenced from:
pyo3::types::any::PyAny::setattr::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::h5b3c6bc73b3bdf20 in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.7.rcgu.o)
pyo3::types::any::PyAny::setattr::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::hc162aa0ccbde8787 in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.7.rcgu.o)
"_PyEval_RestoreThread", referenced from:
_$LT$pyo3..python..Python..allow_threads..RestoreGuard$u20$as$u20$core..ops..drop..Drop$GT$::drop::h79064b282515ab41 in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.3.rcgu.o)
"_PyObject_GenericGetDict", referenced from:
pyo3::pyclass::push_dict_getset::h1f5b8f42adcfeda9 in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.14.rcgu.o)
"_PyErr_Fetch", referenced from:
pyo3::err::PyErr::take::h5624bb2bfe614f3f in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.15.rcgu.o)
"__Py_NotImplementedStruct", referenced from:
pyo3::ffi::object::Py_NotImplemented::h9a3eb059dd172efc in erdos_python.flqabfgcxz43r2.rcgu.o
"_PyUnicode_AsUTF8AndSize", referenced from:
pyo3::types::string::PyString::to_str::hcb33794189cc9c57 in erdos_python.6zhjd1eskm0r3j3.rcgu.o
pyo3::types::string::PyString::to_str::h99a9ffeded43257e in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.13.rcgu.o)
"_PyExc_TypeError", referenced from:
_$LT$pyo3..exceptions..PyTypeError$u20$as$u20$pyo3..type_object..PyTypeInfo$GT$::type_object_raw::hebc536565292a07c in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.0.rcgu.o)
"_PyErr_NewException", referenced from:
pyo3::err::PyErr::new_type::hb9190e49e1c74123 in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.15.rcgu.o)
"__Py_TrueStruct", referenced from:
pyo3::ffi::boolobject::Py_True::h685a8e11c1f9a93c in erdos_python.18yekmqo97jwh5vu.rcgu.o
pyo3::ffi::boolobject::Py_True::hc99fcef93ce2dd43 in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.7.rcgu.o)
"_PyObject_GetAttr", referenced from:
pyo3::instance::Py$LT$T$GT$::call_method::_$u7b$$u7b$closure$u7d$$u7d$::h2515ddd9bd89d8a4 in erdos_python.4o69xy5l91ev29mc.rcgu.o
pyo3::instance::Py$LT$T$GT$::call_method::_$u7b$$u7b$closure$u7d$$u7d$::h577f4c78d15d3649 in erdos_python.4o69xy5l91ev29mc.rcgu.o
pyo3::instance::Py$LT$T$GT$::call_method::_$u7b$$u7b$closure$u7d$$u7d$::ha861ea35d8e3fe9f in erdos_python.4o69xy5l91ev29mc.rcgu.o
pyo3::instance::Py$LT$T$GT$::call_method::_$u7b$$u7b$closure$u7d$$u7d$::hfdc7f67ae598d8dd in erdos_python.4o69xy5l91ev29mc.rcgu.o
pyo3::instance::Py$LT$T$GT$::getattr::_$u7b$$u7b$closure$u7d$$u7d$::h3f71a55a17e1edb5 in erdos_python.4o69xy5l91ev29mc.rcgu.o
pyo3::types::any::PyAny::getattr::_$u7b$$u7b$closure$u7d$$u7d$::hd9c9066e5cbf8344 in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.7.rcgu.o)
"_PyEval_EvalCode", referenced from:
pyo3::python::Python::run_code::hcdebb70890cc601b in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.3.rcgu.o)
"_PyModule_GetName", referenced from:
pyo3::types::module::PyModule::name::h62b90ec1e5c09e4c in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.2.rcgu.o)
"_PyTuple_SetItem", referenced from:
pyo3::types::tuple::_$LT$impl$u20$pyo3..conversion..IntoPy$LT$pyo3..instance..Py$LT$pyo3..types..tuple..PyTuple$GT$$GT$$u20$for$u20$$LP$T0$C$$RP$$GT$::into_py::h641f4545f1f0d914 in erdos_python.4o69xy5l91ev29mc.rcgu.o
pyo3::types::tuple::_$LT$impl$u20$pyo3..conversion..IntoPy$LT$pyo3..instance..Py$LT$pyo3..types..tuple..PyTuple$GT$$GT$$u20$for$u20$$LP$T0$C$T1$RP$$GT$::into_py::h148c64488e997267 in erdos_python.4o69xy5l91ev29mc.rcgu.o
pyo3::types::tuple::_$LT$impl$u20$pyo3..conversion..IntoPy$LT$pyo3..instance..Py$LT$pyo3..types..tuple..PyTuple$GT$$GT$$u20$for$u20$$LP$T0$C$T1$C$T2$RP$$GT$::into_py::hdc86ffabd05cec8d in erdos_python.4o69xy5l91ev29mc.rcgu.o
pyo3::types::tuple::_$LT$impl$u20$pyo3..conversion..IntoPy$LT$pyo3..instance..Py$LT$pyo3..types..any..PyAny$GT$$GT$$u20$for$u20$$LP$T0$C$T1$RP$$GT$::into_py::h2008c562eea6cf75 in erdos_python.8sejcmq4e5nz023.rcgu.o
pyo3::types::tuple::_$LT$impl$u20$pyo3..conversion..IntoPy$LT$pyo3..instance..Py$LT$pyo3..types..tuple..PyTuple$GT$$GT$$u20$for$u20$$LP$T0$C$$RP$$GT$::into_py::h7a4bfbe9345af1ec in erdos_python.cegfz3138195vk1.rcgu.o
pyo3::types::tuple::_$LT$impl$u20$pyo3..conversion..IntoPy$LT$pyo3..instance..Py$LT$pyo3..types..tuple..PyTuple$GT$$GT$$u20$for$u20$$LP$T0$C$T1$RP$$GT$::into_py::h036143c23271057d in erdos_python.drmlcrq1aamodz1.rcgu.o
pyo3::types::tuple::_$LT$impl$u20$pyo3..conversion..IntoPy$LT$pyo3..instance..Py$LT$pyo3..types..tuple..PyTuple$GT$$GT$$u20$for$u20$$LP$T0$C$T1$C$T2$RP$$GT$::into_py::h507b191e1a71e8d4 in erdos_python.drmlcrq1aamodz1.rcgu.o
...
"_PyErr_Restore", referenced from:
pyo3::err::PyErr::restore::h9927ce6bbda65927 in erdos_python.4qjcay4yuyg1tqjv.rcgu.o
pyo3::err::PyErr::take::h5624bb2bfe614f3f in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.15.rcgu.o)
pyo3::err::PyErr::restore::h3b8e8880de9cd0f6 in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.15.rcgu.o)
"_PyBytes_AsString", referenced from:
pyo3::types::bytes::PyBytes::as_bytes::h5ea66dda28d9eac9 in erdos_python.47b46rh3qn2mwosw.rcgu.o
pyo3::types::bytes::PyBytes::as_bytes::h099652a35b3bdc12 in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.10.rcgu.o)
"_PyType_FromSpec", referenced from:
pyo3::pyclass::create_type_object::h181fe10035563334 in erdos_python.bisr1ua0raercj2.rcgu.o
pyo3::pyclass::create_type_object::h34f4e0969eb9a036 in erdos_python.bisr1ua0raercj2.rcgu.o
pyo3::pyclass::create_type_object::h60ccaad2d05d21e5 in erdos_python.bisr1ua0raercj2.rcgu.o
pyo3::pyclass::create_type_object::h7e75473202f0e72c in erdos_python.bisr1ua0raercj2.rcgu.o
pyo3::pyclass::create_type_object::h800d89c5a27df072 in erdos_python.bisr1ua0raercj2.rcgu.o
pyo3::pyclass::create_type_object::h95336a2d8ddd0a5e in erdos_python.bisr1ua0raercj2.rcgu.o
pyo3::pyclass::create_type_object::haa61076de53ecc77 in erdos_python.bisr1ua0raercj2.rcgu.o
...
"__Py_FalseStruct", referenced from:
pyo3::ffi::boolobject::Py_False::ha783acfd459976ba in erdos_python.18yekmqo97jwh5vu.rcgu.o
"_PyType_GenericAlloc", referenced from:
_$LT$pyo3..pyclass_init..PyNativeTypeInitializer$LT$T$GT$$u20$as$u20$pyo3..pyclass_init..PyObjectInit$LT$T$GT$$GT$::into_new_object::h8e220cd96ee46e30 in erdos_python.2ze6cujhuouzjoit.rcgu.o
"_PyBytes_Size", referenced from:
pyo3::types::bytes::PyBytes::as_bytes::h5ea66dda28d9eac9 in erdos_python.47b46rh3qn2mwosw.rcgu.o
pyo3::types::bytes::PyBytes::as_bytes::h099652a35b3bdc12 in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.10.rcgu.o)
"_PyLong_FromUnsignedLongLong", referenced from:
pyo3::types::num::_$LT$impl$u20$pyo3..conversion..IntoPy$LT$pyo3..instance..Py$LT$pyo3..types..any..PyAny$GT$$GT$$u20$for$u20$u64$GT$::into_py::hc88d51cb7e9e88ee in erdos_python.3creat87iwuzxe8.rcgu.o
"_PyModule_Create2", referenced from:
pyo3::ffi::modsupport::PyModule_Create::hff6a74f055b5e865 in erdos_python.3cap3utahqi1jyp0.rcgu.o
"_PyObject_Call", referenced from:
pyo3::types::any::PyAny::call::h130601c19f73817f in erdos_python.2v9ruangams3xknl.rcgu.o
pyo3::types::any::PyAny::call::h5986e7ee6bd0ea9d in erdos_python.2v9ruangams3xknl.rcgu.o
pyo3::types::any::PyAny::call::hd4b2f85fd2143aec in erdos_python.2v9ruangams3xknl.rcgu.o
pyo3::types::any::PyAny::call::hdf92234573a52e47 in erdos_python.2v9ruangams3xknl.rcgu.o
pyo3::instance::Py$LT$T$GT$::call_method::_$u7b$$u7b$closure$u7d$$u7d$::h2515ddd9bd89d8a4 in erdos_python.4o69xy5l91ev29mc.rcgu.o
pyo3::instance::Py$LT$T$GT$::call_method::_$u7b$$u7b$closure$u7d$$u7d$::h577f4c78d15d3649 in erdos_python.4o69xy5l91ev29mc.rcgu.o
pyo3::instance::Py$LT$T$GT$::call_method::_$u7b$$u7b$closure$u7d$$u7d$::ha861ea35d8e3fe9f in erdos_python.4o69xy5l91ev29mc.rcgu.o
...
"_PyUnicode_AsEncodedString", referenced from:
pyo3::types::string::PyString::to_string_lossy::h99ed9dd46021602b in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.13.rcgu.o)
"_PyDict_SetItem", referenced from:
pyo3::types::dict::PyDict::set_item::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::h09184eb549aeac8d in erdos_python.1gxqznnivutptqz0.rcgu.o
pyo3::types::dict::PyDict::set_item::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::h105b85e719a64457 in erdos_python.1gxqznnivutptqz0.rcgu.o
pyo3::types::dict::PyDict::set_item::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::h10dbc39666f1ce96 in erdos_python.1gxqznnivutptqz0.rcgu.o
pyo3::types::dict::PyDict::set_item::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::h82681fffbe929671 in erdos_python.1gxqznnivutptqz0.rcgu.o
pyo3::types::dict::PyDict::set_item::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::hb0c73846b22b590f in erdos_python.1gxqznnivutptqz0.rcgu.o
"_Py_CompileStringExFlags", referenced from:
pyo3::ffi::cpython::pythonrun::Py_CompileString::h5bfa27fc58620660 in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.9.rcgu.o)
"_PyTuple_New", referenced from:
pyo3::types::tuple::_$LT$impl$u20$pyo3..conversion..IntoPy$LT$pyo3..instance..Py$LT$pyo3..types..tuple..PyTuple$GT$$GT$$u20$for$u20$$LP$T0$C$$RP$$GT$::into_py::h641f4545f1f0d914 in erdos_python.4o69xy5l91ev29mc.rcgu.o
pyo3::types::tuple::_$LT$impl$u20$pyo3..conversion..IntoPy$LT$pyo3..instance..Py$LT$pyo3..types..tuple..PyTuple$GT$$GT$$u20$for$u20$$LP$T0$C$T1$RP$$GT$::into_py::h148c64488e997267 in erdos_python.4o69xy5l91ev29mc.rcgu.o
pyo3::types::tuple::_$LT$impl$u20$pyo3..conversion..IntoPy$LT$pyo3..instance..Py$LT$pyo3..types..tuple..PyTuple$GT$$GT$$u20$for$u20$$LP$T0$C$T1$C$T2$RP$$GT$::into_py::hdc86ffabd05cec8d in erdos_python.4o69xy5l91ev29mc.rcgu.o
pyo3::types::tuple::PyTuple::new::h2e150a5ca7556a94 in erdos_python.555cx17egk1h4r95.rcgu.o
pyo3::types::tuple::PyTuple::new::h57a2cd2bab15c7e9 in erdos_python.555cx17egk1h4r95.rcgu.o
pyo3::types::tuple::_$LT$impl$u20$pyo3..conversion..IntoPy$LT$pyo3..instance..Py$LT$pyo3..types..any..PyAny$GT$$GT$$u20$for$u20$$LP$T0$C$T1$RP$$GT$::into_py::h2008c562eea6cf75 in erdos_python.8sejcmq4e5nz023.rcgu.o
pyo3::types::tuple::_$LT$impl$u20$pyo3..conversion..IntoPy$LT$pyo3..instance..Py$LT$pyo3..types..tuple..PyTuple$GT$$GT$$u20$for$u20$$LP$T0$C$$RP$$GT$::into_py::h7a4bfbe9345af1ec in erdos_python.cegfz3138195vk1.rcgu.o
...
"_PySequence_Size", referenced from:
pyo3::types::sequence::PySequence::len::hfc6ab9ea310fc9ec in erdos_python.2091xl2n4rgokxox.rcgu.o
"_PyExc_Exception", referenced from:
_$LT$pyo3..exceptions..PyException$u20$as$u20$pyo3..type_object..PyTypeInfo$GT$::type_object_raw::h7c4f62a11ebdcf87 in erdos_python.2hgwowqwktp2ewkg.rcgu.o
"_PyModule_GetDict", referenced from:
pyo3::python::Python::run_code::_$u7b$$u7b$closure$u7d$$u7d$::habb39b51ba033263 in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.3.rcgu.o)
"_PyList_New", referenced from:
pyo3::types::list::new_from_iter::h9b38ca1132715523 in erdos_python.4yq4p61w6u6q9tze.rcgu.o
pyo3::types::list::PyList::empty::he2dc7cfee39014a8 in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.11.rcgu.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
System details as follows:
Python version: 3.7.12
MacOS version: 12.1
Command Line Tools version: 13.2.0.0.1.1638488800
Tests fail because the ERDOS node tries and fails to connect to the rosmaster.
All our object detectors detect traffic lights, but they don't classify the color of the traffic lights. To solve this issue, we have to implement a traffic light color classifier. It doesn't have to be a model-based classifier as long as it has high accuracy (see https://github.com/thedch/traffic-light-classifier).
The classifier code could go into a new operator, which must be connected to the detector operators (https://github.com/erdos-project/erdos/blob/master/examples/pylot/pylot.py#L493) and ERDOS agent operator.
The detectors we use in Pylot sometimes do not reliably detect an object in every frame. We can smooth out these miss-detection using by predicting object bounding boxes using Kalman Filters (or other technique). We currently have single object Kalman Filter trackers, but the trackers are all restarted from scratch whenever they receives bounding boxes from the detector. Instead, the tracker operator should:
tracker.update(frame, bounding_box)
instead of tracker.update(frame, bounding_box)
(see https://github.com/erdos-project/erdos/blob/master/examples/pylot/trackers/cv2_tracker.py#L18)sudo apt install python-cv-bridge
solves this problem.
The DRN and DLA (@DequanWang can add you to the repository) models we currently use haven't been trained on Carla data.
To solve this issue, we have to:
data_gatherer.py
script (see #41 for more details).The master prints an error when thetest_input_receiver_join
is run, but the test still succeeds and does not fail.
Run the following command: cargo test test_input_receiver_join -- --nocapture
. The log is:
running 1 test
Mar 21 16:02:58.951 DEBG Starting node 0
Mar 21 16:02:58.953 DEBG Executing operator 97944689-ce67-a82c-c506-8ba4659991b6 on node 0
Mar 21 16:02:58.953 DEBG Executing operator a1a1bc90-4811-2c4b-0580-1b8b3546c0ab on node 0
Mar 21 16:02:58.954 DEBG Executing operator 96e1c913-b9c0-12da-3817-0fa1349bebd0 on node 0
Mar 21 16:02:58.955 DEBG Notfiying node initialized
Error flowing watermark
test test_input_receiver_join ... ok
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 1 filtered out
As far as I can tell, the regression was introduced in e24a859.
Hi,
First of all amazing work, the pylot repo seems very useful and well structured.
I'm trying to install the erdos library to be able to work with pylot without docker containers, but I run into issues.
After I run "source ./install.sh", I run the tests but both fail. Below is the stack trace for ros:
~/Software/erdos$ python tests/sum_squares_test.py --framework=ros
I0713 12:59:04.849879 140101035767616 topics.py:1132] topicmanager initialized
/home/theophile/Software/erdos/erdos/ros/ros_output_data_stream.py:40: SyntaxWarning: The publisher should be created with an explicit keyword argument 'queue_size'. Please see http://wiki.ros.org/rospy/Overview/Publishers%20and%20Subscribers for more information.
self.uid, String, latch=True, queue_size=None)
/home/theophile/Software/erdos/erdos/ros/ros_output_data_stream.py:40: SyntaxWarning: The publisher should be created with an explicit keyword argument 'queue_size'. Please see http://wiki.ros.org/rospy/Overview/Publishers%20and%20Subscribers for more information.
self.uid, String, latch=True, queue_size=None)
/home/theophile/Software/erdos/erdos/ros/ros_output_data_stream.py:40: SyntaxWarning: The publisher should be created with an explicit keyword argument 'queue_size'. Please see http://wiki.ros.org/rospy/Overview/Publishers%20and%20Subscribers for more information.
self.uid, String, latch=True, queue_size=None)
/home/theophile/Software/erdos/erdos/ros/ros_output_data_stream.py:40: SyntaxWarning: The publisher should be created with an explicit keyword argument 'queue_size'. Please see http://wiki.ros.org/rospy/Overview/Publishers%20and%20Subscribers for more information.
self.uid, String, latch=True, queue_size=None)
/home/theophile/Software/erdos/erdos/ros/ros_output_data_stream.py:40: SyntaxWarning: The publisher should be created with an explicit keyword argument 'queue_size'. Please see http://wiki.ros.org/rospy/Overview/Publishers%20and%20Subscribers for more information.
self.uid, String, latch=True, queue_size=None)
Process Process-3:
Traceback (most recent call last):
File "/home/theophile/anaconda3/envs/pylot/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/home/theophile/anaconda3/envs/pylot/lib/python3.6/multiprocessing/process.py", line 93, in run
self._target(*self._args, **self._kwargs)
File "/home/theophile/Software/erdos/erdos/ros/ros_executor.py", line 32, in _execute_helper
op.execute()
File "tests/sum_squares_test.py", line 37, in execute
self.publish_random_number()
File "/home/theophile/Software/erdos/erdos/utils.py", line 50, in wrapper
func(*args, **kwargs)
File "tests/sum_squares_test.py", line 33, in publish_random_number
self.get_output_stream("integer_out").send(output_msg)
File "/home/theophile/Software/erdos/erdos/ros/ros_output_data_stream.py", line 27, in send
self.publisher.publish(msg)
File "/opt/ros/melodic/lib/python2.7/dist-packages/rospy/topics.py", line 882, in publish
self.impl.publish(data)
File "/opt/ros/melodic/lib/python2.7/dist-packages/rospy/topics.py", line 1066, in publish
serialize_message(b, self.seq, message)
File "/opt/ros/melodic/lib/python2.7/dist-packages/rospy/msg.py", line 152, in serialize_message
msg.serialize(b)
File "/opt/ros/melodic/lib/python2.7/dist-packages/std_msgs/msg/_String.py", line 55, in serialize
_x = _x.encode('utf-8')
AttributeError: 'bytes' object has no attribute 'encode'
I'm using python 3.6 (supported by Carla), and ros seems to be correctly installed:
~/Software/erdos$ rosversion -d
melodic
With ray, the stack trace is:
~/Software/erdos$ python tests/sum_squares_test.py --framework=ray
2019-07-13 13:07:58,251 INFO node.py:498 -- Process STDOUT and STDERR is being redirected to /tmp/ray/session_2019-07-13_13-07-58_251164_128678/logs.
2019-07-13 13:07:58,354 INFO services.py:409 -- Waiting for redis server at 127.0.0.1:23687 to respond...
2019-07-13 13:07:58,463 INFO services.py:409 -- Waiting for redis server at 127.0.0.1:13918 to respond...
2019-07-13 13:07:58,464 INFO services.py:806 -- Starting Redis shard with 10.0 GB max memory.
2019-07-13 13:07:58,472 INFO node.py:512 -- Process STDOUT and STDERR is being redirected to /tmp/ray/session_2019-07-13_13-07-58_251164_128678/logs.
2019-07-13 13:07:58,473 WARNING services.py:1298 -- Warning: Capping object memory store to 20.0GB. To increase this further, specify object_store_memory
when calling ray.init() or ray start.
2019-07-13 13:07:58,473 INFO services.py:1446 -- Starting the Plasma object store with 20.0 GB memory using /dev/shm.
I0713 13:07:59.807582 140074814605120 ray_executor.py:53] Executing input_op
I0713 13:07:59.818301 140074814605120 ray_executor.py:53] Executing output_op
Traceback (most recent call last):
File "tests/sum_squares_test.py", line 118, in
app.run(main)
File "/home/theophile/anaconda3/envs/pylot/lib/python3.6/site-packages/absl/app.py", line 300, in run
_run_main(main, args)
File "/home/theophile/anaconda3/envs/pylot/lib/python3.6/site-packages/absl/app.py", line 251, in _run_main
sys.exit(main(argv))
File "tests/sum_squares_test.py", line 115, in main
graph.execute(FLAGS.framework)
File "/home/theophile/Software/erdos/erdos/graph.py", line 200, in execute
executor.execute()
File "/home/theophile/Software/erdos/erdos/ray/ray_executor.py", line 48, in execute
self.op_handle.dependent_op_handles))
File "/home/theophile/anaconda3/envs/pylot/lib/python3.6/site-packages/ray/worker.py", line 2195, in get
raise value
ray.exceptions.RayTaskError: ray_RayOperator:setup_streams() (pid=128750, host=theophile-desktop)
File "/home/theophile/Software/erdos/erdos/ray/ray_operator.py", line 162, in setup_streams
self._op._internal_setup_streams()
File "/home/theophile/Software/erdos/erdos/op.py", line 182, in _internal_setup_streams
output_stream.setup()
File "/home/theophile/Software/erdos/erdos/ray/ray_output_data_stream.py", line 44, in setup
for actor_handle in self._dependant_op_handles
File "/home/theophile/Software/erdos/erdos/ray/ray_output_data_stream.py", line 44, in
for actor_handle in self._dependant_op_handles
AttributeError: 'str' object has no attribute 'on_msg'
Thank you very much for your help!
Theo
Implement benchmarks (e.g. throughput, latency) to profile ERDOS which can be run using cargo bench
.
Consider extending criterion with custom measurements to report metrics in the multi-process/multi-thread setting.
The current benchmarks in benches
are broken/stale.
I'm unable to install using pip3 install erdos==0.3.1
. I've tried 3.9 and 3.8, and my friend tried 3.7, but none of these work. My full error message is below. Thanks!
ERROR: Could not find a version that satisfies the requirement erdos==0.3.1 (from versions: 0.1, 0.1.1, 0.1.2, 0.1.3, 0.2.0)
ERROR: No matching distribution found for erdos==0.3.1
Currently, access to state isn't locked. When using the TimeVersionedState, we could introduce unsafe accesses due to concurrency if a watermark callback for time t and a data callback for time t + 1 run simultaneously.
Currently, this shouldn't cause problems because only 1 callback can access state at a time. In the future, we may want to increase parallelism in multi-threaded operators and then this will cause problems.
Lines causing the problem (also in scripts/make_callback_builder.py
):
erdos/src/dataflow/stream/internal_stateful_read_stream.rs
Lines 91 to 95 in fd590d0
Here is a minimal example that presents the issue of a watermark callback not being triggered when using erdos.add_watermark_callback
as opposed to stream.add_watermark_callback
.
Change the following line to primary_cons_watermark_stream.add_watermark_callback(self.ack_watermark_callback)
and the callback will start working, but leaving it as erdos.add_watermark_callback([primary_cons_watermark_stream],self.ack_watermark_callback)
stops the callback from triggering.
import erdos
import time
class SourceOp(erdos.Operator):
""" 1 out operator
Out1 - Sends data to IngressOp
"""
def __init__(self, write_stream: erdos.WriteStream):
self.write_stream = write_stream
@staticmethod
def connect():
return [erdos.WriteStream()]
def run(self):
count = 0
while True:
timestamp = erdos.Timestamp(coordinates=[count])
payload = [erdos.Message(timestamp, count)] * 2
msg = erdos.Message(timestamp, payload)
print("SourceOp: sending {msg}".format(msg=msg))
self.write_stream.send(msg)
count += 1
time.sleep(1)
class IngressOp(erdos.Operator):
""" 3 in 1 out operator
In1 - Receives data from SourceOp
In2 - Receives watermark from SConsPOp (Primary consumer op)
In3 - Receives watermark from SConsSOp (Secondary consumer op)
Out1 - Sends data to SConsPOp and SConsSOp (primary and consumer ops)
"""
def __init__(self, read_stream: erdos.ReadStream,
primary_cons_watermark_stream: erdos.ReadStream,
secondary_cons_watermark_stream: erdos.ReadStream,
write_stream: erdos.WriteStream):
self.write_stream = write_stream
self.queue = {}
read_stream.add_callback(self.callback, [write_stream])
erdos.add_watermark_callback([primary_cons_watermark_stream],
self.ack_watermark_callback)
@staticmethod
def connect(read_stream, primary_cons_watermark_stream,
secondary_cons_watermark_stream):
return [erdos.WriteStream()]
def callback(self, msg, write_stream):
print("IngressOp: received {msg}".format(msg=msg))
self.queue[msg.timestamp] = msg
print("IngressOp: sending {msg}".format(msg=msg))
write_stream.send(msg)
def ack_watermark_callback(self, timestamp):
print(
"IngressOp: received watermarks at timestamp: {timestamp}".format(
timestamp=timestamp))
class SConsOp(erdos.Operator):
""" 1 in 2 out operator
In1 - Receives data from IngressOp
Out2 - Sends watermark to IngressOp
"""
def __init__(self, data_stream: erdos.ReadStream,
write_data_stream: erdos.WriteStream,
write_watermark_stream: erdos.WriteStream):
data_stream.add_callback(self.data_callback, [write_data_stream])
self._write_watermark_stream = write_watermark_stream
self.queue = {}
@staticmethod
def connect(data_stream):
write_data_stream = erdos.WriteStream()
write_watermark_stream = erdos.WriteStream()
return [write_data_stream, write_watermark_stream]
def data_callback(self, msg, write_stream):
print("SConsOp: received {msg}".format(msg=msg))
watermark = erdos.WatermarkMessage(msg.timestamp)
print("SConsOp: sending watermark {watermark} to IngressOp".format(
watermark=watermark))
self._write_watermark_stream.send(watermark)
def main():
# Data comes out of SourceOp
(source_stream, ) = erdos.connect(SourceOp,
erdos.OperatorConfig(name="SourceOp"),
[])
primary_cons_watermark_stream = erdos.LoopStream()
secondary_cons_watermark_stream = erdos.LoopStream()
# Data flows into IngressOp and out of IngressOp again
(ingress_stream, ) = erdos.connect(
IngressOp, erdos.OperatorConfig(name="IngressOp"), [
source_stream, primary_cons_watermark_stream,
secondary_cons_watermark_stream
])
# Data comes into primary SConsOp and out of primary SConsOp
(primary_cons_stream, primary_watermark_stream) = erdos.connect(
SConsOp, erdos.OperatorConfig(name="SConsPOp"), [ingress_stream])
primary_cons_watermark_stream.set(primary_watermark_stream)
# Data comes into secondary SConsOp and out of secondary SConsOp
(secondary_cons_stream, secondary_watermark_stream) = erdos.connect(
SConsOp, erdos.OperatorConfig(name="SConsSOp"), [ingress_stream])
secondary_cons_watermark_stream.set(secondary_watermark_stream)
erdos.run(graph_filename="graph.gv")
if __name__ == "__main__":
main()
Pylot process does not get killed when ctrl-c is pressed. To reproduce the issue run:
python pylot.py --flagfile=configs/detection.conf --carla_step_frequency=1
Pylot does not currently detect lanes. One quick solution for this issue is to use traditional computer vision techniques (e.g., image transforms) like in the Udacity lane finding project https://github.com/udacity/CarND-LaneLines-P1.
As part of this task, we will also have to write a new ERDOS operator, which we have to connect to the Pylor carla operator (https://github.com/erdos-project/erdos/blob/master/examples/pylot/pylot.py#L451) and to the ERDOS agent operator (https://github.com/erdos-project/erdos/blob/master/examples/pylot/pylot.py#L525).
Carla provides 3d world bounding boxes for pedestrians and vehicles. We transform these bounding boxes into 2d bounding boxes which are into the field of view of the RGB camera. However, when we compute the 2d bounding box we take the furthest apart points https://github.com/erdos-project/erdos/blob/master/examples/pylot/detection_utils.py#L355 . Instead, we should use the orienatation of the pedestrian to select the correct plane, and thus provide more accurate 2d bounding boxes.
See for more details on Carla bounding boxes: https://carla.readthedocs.io/en/stable/measurements/
Pylot does not currently detect lanes. However, we could implement lane detection and following using segmented camera frames.
To complete this task, we have to compute the lanes out of the segmented frames (see below an example frame), and send this information to the ERDOS agent. One way to do this is to do this is to write an ERDOS operator, which we connect to the carla operator (https://github.com/erdos-project/erdos/blob/master/examples/pylot/pylot.py#L451) and erdos agent operator (https://github.com/erdos-project/erdos/blob/master/examples/pylot/pylot.py#L525). This new operator registers a callback on segmented frames, and publishes the lane information. We would also have to change the ERDOS agent to register a callback on the data stream published by the new operator, and update its methods that use ground truth lane information (e.g., https://github.com/erdos-project/erdos/blob/master/examples/pylot/agent_utils.py#L178)
In my opinion, the task should be divided into two pull requests:
The ERDOS agent driving policy only follows fine-grained waypoints, and stops for pedestrians, vehicles and traffic lights (see https://github.com/erdos-project/erdos/blob/master/examples/pylot/erdos_agent_operator.py).
In order to make our agent more realistic we have to:
In order to train models on Carla, we need to collect a large data set of camera images, bounding boxes (for vehicles, pedestrians, traffic signs and traffic lights), and segmented images.
We can collect data by running python data_gatherer.py --flagfile=configs/data_gatherer.conf
. However, the car might sometimes get stuck after another car that is not moving, or it may reach its goal. We need either to check from time to time what the data gatherer is doing, or to extend the script to incorporate vehicle speed (e.g., the car is stuck if it hasn't moved for 30 seconds) or some other solution in order to automate data gathering.
Currently the Rust tests aren't well-organized. They should be refactored for clarity and logical organization (tests/inter_thread_tests.rs
is especially in need of some attention).
There appears to be a race condition/concurrency bug in chashmap on which the JoinOperator depends.
Fix this by falling back to a mutexed HashMap.
test_extract
and test_ingest_extract
hang non-deterministically.
The reason for this is likely the following:
Node::run_async()
which executes the tokio runtime in a separate OS thread.A simple work-around is to use different ports in each thread that calls Node::run_async()
.
A better solution is to implement a Node::shutdown()
method.
We would like to log traffic signs and traffic lights in order to train models for traffic signs detection and classification. However, the Carla server provides only provides the 3d world location of traffic signs and traffic lights.
We can instead get the traffic signs from the Carla segmented images. Commit 6d01912 added the logic to subscribe to the segmented images in the data gatherer, and applies the traffic signs/lights mask over the segmented logic.
However, we still have to extract bounding boxes out of the masked image 6d01912#diff-1af1b75e940d15948d4dc49ea8c0aff2R224
On Ubuntu 18.04, use ROS Melodic instead of ROS Kinetic.
Pylot currently uses a traffic light detector and classifier that hasn't only been briefly trained. To solve this issue we would have to:
python pylot.py --flagfiles=configs/traffic_light.conf
.Hello dear community, now I'm trying to implement ERDOS on a NVIDIA device which the arch is aarch64.
I've finished these steps:
apt install gcc-aarch64-linux-gnu
rustup target add aarch64-unknown-linux-gnu
modify the ~/.cargo/config.toml as
[target.aarch64-unknown-linux-gnu]
linker = "aarch64-linux-gnu-gcc"
ar = "aarch64-unknown-linux-gnu-gcc"
Then follow the README on Github, I can build ERDOS(X86-64) successfully both on Rust and Python
I add the following code on ~/.cargo/config.toml
[build]
target = "aarch64-unknown-linux-gnu"
As for step 5, I want build ERDOS on aarch64 with Python api, but the bulld processs failed at the last minute, here are the error info:
The most critical info is:
Finished dev [unoptimized + debuginfo] target(s) in 1m 33s
error: Rust build failed; unable to find any *erdos.so in /mnt/erdos/target/debug
Any help or insight for this? Thanks for all!
ERDOS currently has no tests for the Python API. Adding some would help detect breaking changes.
Fixing this issue would involve writing tests using pytest. python/examples/*
can be converted to integration tests. Adding unit tests would be helpful as well.
When an operator is under high load (i.e. messages are coming in at a very high rate), events are only inserted into the lattice and not removed/processed until the rate of incoming messages decreases.
This may be due to a prioritization issue related to how the operator executor interacts with Rust futures or the underlying runtime since the threads responsible for running events should access the lattice at the same time as the thread inserting events.
The busy looping below causes resource starvation. This causes observable issues when the number operators increases while the number of threads remains constant (I observed it with 4 operators and 4 threads on a node).
Lines 157 to 164 in 9dcde09
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.