-
|
From @accateo on February 25, 2017 10:37 Hi, http://wiki.icub.org/brain/icub_basic_image_processing.html I have connected the image source, but I don't understand where I should see these messages: We got an image of size 320x240
I have also changed the timestep value in ode_params.ini file, but the warning remains and change its value. Thanks Copied from original issue: robotology/mesh-support#410 |
Beta Was this translation helpful? Give feedback.
Replies: 16 comments
-
|
Hi @accateo, first of all, please use the Q&A for any questions you have and not the |
Beta Was this translation helpful? Give feedback.
-
|
@accateo please tend to ask one question per issue, this just makes things simpler to track. In any case:
|
Beta Was this translation helpful? Give feedback.
-
|
Thanks for the second question. yarp connect /icubSim/cam/left /tutorial/image/in |
Beta Was this translation helpful? Give feedback.
-
|
@accateo where do you run the executable findLocation? What is |
Beta Was this translation helpful? Give feedback.
-
|
@accateo what to run in terminals (I am assuming you are following the tutorial and compiled code)
|
Beta Was this translation helpful? Give feedback.
-
|
Sorry, but "findLocation" terminal how can I open it? |
Beta Was this translation helpful? Give feedback.
-
|
Hi @accateo What @vtikha pointed out is simply that those printout messages are showing up in the terminal from which you run the Can you launch the tutorial again to verify that? |
Beta Was this translation helpful? Give feedback.
-
|
Hi @accateo ok now I get it, so, you created a Then you compiled and this generated a So, no worries, now just run the You should now be ok |
Beta Was this translation helpful? Give feedback.
-
|
The problem is that I have exactly done the things that you have described, but these messages don't appear. Anyway is not important, the rest of the simulation works. |
Beta Was this translation helpful? Give feedback.
-
|
@accateo can you post the code here please? I am referring to the code that is used to generate the |
Beta Was this translation helpful? Give feedback.
-
#include <stdio.h>
#include <yarp/os/all.h>
#include <yarp/sig/all.h>
using namespace yarp::os;
using namespace yarp::sig;
int main() {
Network yarp; // set up yarp
BufferedPort<ImageOf<PixelRgb> > imagePort; // make a port for reading images
imagePort.open("/tutorial/image/in"); // give the port a name
while (1) {
ImageOf<PixelRgb> *image = imagePort.read(); // read an image
if (image!=NULL) { // check we actually got something
printf("We got an image of size %dx%d\n", image->width(), image->height());
}
}
return 0;
} |
Beta Was this translation helpful? Give feedback.
-
|
@accateo you are probably not running the code or not connecting as everything is in order. yarpview --name /viewLeft and in another one do yarp connect /icubSim/cam/left /view/LeftCan you confirm that you see an image displayed in the yarpviewer? |
Beta Was this translation helpful? Give feedback.
-
|
@vtikha yes, I have already done that two commands and I saw the image from the icub's left eye... |
Beta Was this translation helpful? Give feedback.
-
|
@accateo then it is impossible that you do not see the printouts unless the connections you are doing and executable that you are launching are not correct. ImageOf<PixelRgb> *image = imagePort.read(); // read an image
if (image!=NULL) { // check we actually got something
printf("We got an image of size %dx%d\n", image->width(), image->height());
} |
Beta Was this translation helpful? Give feedback.
-
|
I know that is really strange, i don't know. But I repeat, it is not important. |
Beta Was this translation helpful? Give feedback.
-
|
Ok then, I think we can close this issue. |
Beta Was this translation helpful? Give feedback.
@accateo please tend to ask one question per issue, this just makes things simpler to track. In any case:
tutorial basically generates two different programs. One called
findLocationand onelookAtLocation. The first one,findLocationbasically generates the prints you are looking for:If you have copied the code from the online tutorial, then these prints happen in the terminal where you run the
findLocationmodule.If on the other hand you are using the
icub-tutorialrepository, just uncomment this line from thefindLocation.cppand recompile. This will now display the printouts at every frame.The second one,
lookAtLocationprogram basically moves the head towards the bluish object l…