Comments (5)
This will be implemented as part of the pub/sub system. Similar to ROS, I think we should allow threads to subscribe callbacks to string paths.
For example, the serial event handler will publish to "/
An over-excited logger can subscribe to "/" and get every single message possible.
The GUI pane for IMU can subscribe to "/sensors/IMU", or whatever the IMU serial reader writes to. Alternatively, for playback, a sensor log reader can publish to "/sensor/IMU", and no other component in the system would be the wiser. This allows us have cleanly-implemented playback
(side note: There are global clock concerns during replay. We'll get to that.)
I am not positive this is the best strategy. There isn't compile-time type-safety with this approach, e.g., nothing stops an IMUMessage from being published to "/sensors/GPS", which will cause the GPSListeners to explode or become very confused.
Interface
abstract class IMessage {
// no data members required...not sure I like this.
}
class ImuMessage extends IMessage {
float X_acceleration;
float Y_acceleration;
}
void publish(String path, IMessage msg);
public interface IListener {
// should we know what the message was that called us?
// for example, the everything-logger would want to know what message it is logging
public void messageCallback(IMessage msg)
}
void subscribe(String path, IListener callback);
@TrevorDecker thoughts?
from robobuggy.
oh! java can parametrize types! i'll update that soon.
from robobuggy.
Java type parameters don't do much in our case. Our flexibility comes from being able to subscribe to arbitrary message paths, and we can't do that as easily if we have compile-time checking.
Other Design thoughts?
@ihartwig @bstrysko @Ginto8 @kbrennan234 @ayeohmy
from robobuggy.
I vote we get version 0.1 kind of working and worry about type safety latter. Run time should be fine we will just have to test our code for full coverage, which is a good thing anyway.
from robobuggy.
commit 272e491 prototypes the pubsub that's helping with cleanup. This will soon be part of the replay mechanism.
from robobuggy.
Related Issues (20)
- Get Performance traces of Live Buggy
- verify simulation of buggy path HOT 1
- Implement and verify that the buggy will deploy brakes at appropriate times
- Fix negative sign on gps HOT 1
- add a play back robot
- stop front wheel from needing manual centering HOT 1
- stop imu from needing calibration when turned on HOT 1
- calibrate imu frame to gps frame HOT 1
- Clean up and consolidate developer tools HOT 1
- fix simulated imu HOT 1
- If path planner stops running then brakes will stay in old state
- camera node will crash entire program HOT 2
- surface slows down after running alice for a few minutes HOT 5
- usb disconnect HOT 1
- imu develops ~90 degree offset HOT 1
- get kf localizer to work on play back speeds other then real time
- Detect if another instance of Alice is running
- Reformat waypoints in code
- Startup checks
- cannot find file HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from robobuggy.