-
Notifications
You must be signed in to change notification settings - Fork 9
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
Select a real world codebase for a first proof of concept #26
Comments
We could look into something used in real world, even if simple. We can take something from https:/robotology/icub-basic-demos or from the vvv tutorial. Ideally we should not do a example from no where, as we risk of structuring the code around our available APIs, rather then understanding how our APIs should be done to be convenient to use on real world code. |
A relatively simple example for sure used in real world is https:/robotology/icub-tests/blob/v1.18.0/src/positionDirect/PositionDirect.cpp#L243, but perhaps the RTF machine may be complicate its use. A more didactic example is https:/vvv-school/tutorial_joint-interface/blob/4d71c7846b61ad321b0f53f8c5a09b6880a25d1c/src/positiondirect.cpp#L171. |
Another interesting possible use is robotology/gazebo-yarp-plugins#529 , in which a simple test for the |
Today I tried including the Here are the modifications: --- a/src/position.cpp
+++ b/src/position.cpp
@@ -12,6 +12,7 @@
#include <yarp/os/RFModule.h>
#include <yarp/os/RpcServer.h>
#include <yarp/os/Time.h>
+#include <yarp/telemetry/BufferManager.h>
#include <yarp/dev/Drivers.h>
#include <yarp/dev/PolyDriver.h>
@@ -20,6 +21,8 @@
using namespace yarp::os;
using namespace yarp::dev;
+yarp::telemetry::BufferManager<double> bm("tutorial_pos_ctrl.mat",
+ { {"pos",{1,1}} }, 100, true);
class CtrlModule: public RFModule
{
@@ -69,6 +72,8 @@ protected:
double t0=Time::now();
while (!done&&(Time::now()-t0<10.0))
{
+ ienc->getEncoder(joint,&enc);
+ bm.push_back({enc}, "pos");
yInfo()<<"Waiting...";
Time::delay(0.1); // release the quantum to avoid starving resources
ipos->checkMotionDone(&done); ResultHere is the resulting struct:
Issues
|
Tracked in #46 . |
@Nicogene can you paste the link to the fork/branch of the modified version of the example, and the we can close the issue? |
Here is the branch where I pushed these changes https:/Nicogene/tutorial_joint-interface/tree/yarp_telemetry Closing. |
No description provided.
The text was updated successfully, but these errors were encountered: