Comments (3)
Hey David
We do this one way, though I'm sure there are others ...
CORBA Deployer 1
Component 1 of type Foo
Port A - connection name Snafu
CORBA Deployer 2
Component 1 of type CORBA
Component 2 of type Bar
Port B - connection name Snafu
What the "CORBA" component type does is to automagically create a proxy of Component 1 inside Deployer 2, complete with all ports, properties, etc. Then Component 2 makes a connection to the "local" proxy's port, and the underlying magic actually connects the Deployer2:Component2:PortB port to the Deployer1:Component1:PortA port. You need to run the CORBA name server somewhere, and have both deployers registering with it.
I think that there is a basic example buried in the online Orocos doc's, though been a while since I've looked.
Hopefully this helps point you in a direction
Cheers
Stephen
from rtt.
Hi Stephen,
Thank you for your clear answer. I managed to connect OROCOS components over a network using CORBA.
Actually it was much easier than I expected.
Thank you very much!
Kind regards,
David
from rtt.
Hello @snrkiwi,
After getting the CORBA implementation working, I was trying to implement a state machine architecture with the built-in OROCOS functions using a OPS file. The code in the OPS file can be found below:
For the client side:
import("ocl");
require("print");
loadComponent("controller", "CORBA");
loadComponent("safety", "CORBA");
safety.setPeriod(0.001);
controller.setPeriod(0.01);
StateMachine fsm {
var bool could_config = false;
var bool emergency_pressed = false;
initial state PREOP{
entry {
print.ln("In pre-operational state");
could_config = safety.configure() && controller.configure();
if could_config then {
print.ln("Configured");
connect("safety.emergencyOut", "controller.emergency_stop", cp);
safety.start();
controller.start();
safety.resetRed();
safety.resetGreen();
safety.setOrange();
}
}
transition emergency_stop( emergency_pressed ) if (emergency_pressed ) select FAILURE;
}
state OPERATION{
entry {
print.ln("In operational state");
safety.resetOrange();
safety.setGreen();
}
transitions {
if safety.emergencyOut.last() == true then select failure;
}
}
final state FAILURE {
entry {
print.ln("In failure state now.");
safety.resetOrange();
safety.resetGreen();
safety.setRed();
}
}
}
RootMachine fsm deployApp;
deployApp.activate();
deployApp.start();
For the server side:
path("/usr/local/lib/orocos");
import("ocl"),
import("MotorController");
import("IOSafety");
loadComponent("motorController", "MotorController");
loadComponent("safety", "IOSafety");
server("controller", true);
server("safety", true);
However, I still get errors in my deployer terminal that the InputPort was not found.
Does anyone know how to solve this issue?
Kind regards,
David
from rtt.
Related Issues (20)
- no boost / RTTv3 HOT 1
- clarification on copyright HOT 3
- 2.9.1 ros debian package fails to install HOT 5
- Massive deadlocking when disconnecting connections in parallel HOT 2
- Portable install space HOT 10
- Omniorbpy
- rtt does not support const array ?
- orocos with imcompatiable gcc version (7.4) HOT 1
- cleanupHook called twice after in runtime -> exception -> cleanup
- sample given to setDataSample seem to sometimes "leak" to the other side HOT 3
- catkin build err HOT 2
- PluginLoader::loadTypekits throws boost::filesystem_error for "File name too long" with long path_list
- Problems installing OROCOS under Linux-RTAI/Xenomai HOT 4
- Value parse problem with user defined data in a property bag
- Windows build broken
- Could not allocate configuration semaphore 'sem' for ***,Throwing std::bad_alloc. HOT 1
- Orocos on raspberrypi 3b+ HOT 4
- How to properly configure services
- Deadlock when the input event port is disconnected from the output when the connection is active
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 rtt.