Comments (9)
The program freezes during the call of the method advertiseService in RT system (namely hrp4)
at the following line
https://github.com/stack-of-tasks/dynamic_graph_bridge/blob/fuerte/src/ros_interpreter.cpp#L19
This is called during the creation of the HRPController in sot-hrp*.
As a result, sometimes the service run_command
is not created, and sometimes it exists,
is listed by rosservice list
and can be called using the
rosrun dynamic_graph_bridge run_command
command (and the commands works:
i can see the state of the robot for example).
Also, calling rosnode list
shows that the node dynamic_graph_bridge exists in both cases.
This has been tested on my local computer and works perfectly fine on it.
The problem appears only on the robot's computer.
I am using ros fuerte.
There are no error signaled in roswtf
or in ros logs.
from sot-hrprtc-hrp2.
Yes, this line is not RT-compatible. This is likely to be the issue.
We've got to move that outside of the RT if this is in.
from sot-hrprtc-hrp2.
Hi, Thomas, Francois,
As far as my recollection goes, it was working on our robot.
I am almost pretty sure that I did the test on servo-off mode.
It was using electric.
I agree that the line should not be in the RT part. However it was my understanding that the object instantiation was left outside the real-time part.
from sot-hrprtc-hrp2.
Apparently @francois-keith got some issues when this line is called. I am suspecting this is due to the fact that the CPU speed is much lower on HRP4, you are currently residing on luck (and fast CPU) to have this working on HRP2LAAS.
Do you know where this line is instantiated/called in the rtc part?
from sot-hrprtc-hrp2.
Hi Thomas, Francois,
There is a mistake on the initialization of the SoT.
The code to load the library is here:
https://github.com/stack-of-tasks/sot-hrprtc-hrp2/blob/master/src/rtc-stack-of-tasks.cpp#L523
This is wrong because it is in the real-time loop.
Try to put it in the activation or startup part.
However if I remember correctly I had a problem in figuring out when and how the activation and the startup are controlled in the robot.
from sot-hrprtc-hrp2.
Yes, it seems a good candidate to me. @francois-keith can you confirm it?
from sot-hrprtc-hrp2.
I have run some tests on the initialization.
From the experiments, both onExecute
and onActivated
are executed in the RT loop.
onStartup
, on the contrary, is run outside.
So, in theory, putting the initialization in this function would correct the problem.
But here is the tricky part: the initialization of the robot structure data (the data that are in sotinfo)
is run after the onStartup
method.
In fact, both methods onInitialize
and onStartup
are called together by the method create_component
ref = self.ref.create_component(args) #line 202
in /opt/grx/share/hrpsys/jython/rtm.py
called by initRTC
https://github.com/stack-of-tasks/sot-hrprtc-hrp2/blob/master/scripts/grx/sot.py.in#L145
So for now, the initialization cannot be done properly:
none of the RTC methods of RtcStackOfTasks
is both run outside the RT loop
and after the call to setConfiguration.
Also, there are no overload of the method create_component
that directly loads the configuration.
Note1: for info, here is the value of the variable robot_config_.libname in the current configuration:
onInitialize robot_config_.libname: libtherobot.so
//due to https://github.com/stack-of-tasks/sot-hrprtc-hrp2/blob/topic/hrp4/src/rtc-stack-of-tasks.cpp#L192
onStartup robot_config_.libname: librobot.so
//due to https://github.com/stack-of-tasks/sot-hrprtc-hrp2/blob/topic/hrp4/src/rtc-stack-of-tasks.cpp#L53
onActivated robot_config_.libname: libsot-hrp4-controller.so
Note2: by hard-coding the info of sotinfo in the code, I can run the sot on the hrp4 (so this is the last big obstacle apparently).
from sot-hrprtc-hrp2.
This is why I had to put it in onExecute.
We should send a email to the OpenRTM people to get the proper way to do that.
Geoffrey Biggs is usually very reactive.
from sot-hrprtc-hrp2.
Can you create a thread in onStartup
and make it finish the initialization at the right time?
Unless OpenRTM provide you some utility to ease this this seems the best option, IMHO.
from sot-hrprtc-hrp2.
Related Issues (2)
- Controller frequency HOT 2
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 sot-hrprtc-hrp2.