The tutorial took me a while to locate, so I will place the link here for others who read this discussion in future.
I read the tutorial and checked it against your description. I noticed that you mention rqt_configure. But in the tutorial, it is actually rqt_reconfigure
I'm so sorry, I should've posted it myself.
I ran the correct command in the shell but wrote it wrongly in my previous post. What bothers me most is that the camera/color/filtered does not seem to even exist, or at least it pops up a window that freezes immediately (it never shows anything from the cameras). That doesn't happen with other topics I'm sure exist.
The rqt_reconfigure pops up another window but it doesn't have the rgb_filter option in it. It's something I did or is normal that it doesn't work?
No worries about not posting the link. A person can learn a lot on the journey towards a destination. I am not a Euclid specialist like Amit and MajdS, so please bear with me if I am slow in understanding some issues.
The tutorial would suggest that the filter node is not present by default and that you have to define it yourself before you can use it (see 'Section 2: Creating our RGB filter'). In this line of the script, it is saying that the publisher - 'pub' - should publish to a topic called camera/colored/filtered.
pub = rospy.Publisher('/camera/color/filtered', Image, queue_size=10)
I checked the ROS documentation and I cannot find a camera/color/filtered option either, only image_raw like you found.
I already did that before, but the updated version of the tutorial already adds the underscore.
I have done some tests and one of the things that does not match is this:
To the /camera/color/filtered, the subscriber should be /camera/color/image_raw. As you can see, "/image_view_1506200009092027360" is the subscriber so I imagine it didn't work. That led me into thinking maybe I executed the .py in an incorrect sequence. I ran each command in a new Terminal so it shouldn't be a problem.
Another thing that occurred to me is the last def of the rgb_filter_node.py: it says if __name__== '__main__': rgb_filter(). AFAIK, that means that the rgb_filter() should only be executed if a main function exists, which in this case doesn't. These are the two possible problems I've found. Tell me what you think, and I appreciate that you take the time in looking and doing some research. It means and helps a lot. So thanks in advance
You're very welcome. I'm learning as I go on this topic, but the learning always comes in useful in future when helping others. So thank you for that learning opportunity.
During further research, I learned that in the Ubuntu terminal window, you can type “rostopic list” to view all the topics available for the Euclid.
When I'm debugging, I usually start at the first error encountered. This is because once a script trips up once, it keeps on tumbling and can break various instructions further down the script. Those latter instructions may not actually have anything wrong with them though - it is the first failure that causes a cascade of subsequent failures, and fixing the first error in the list can cause all the other errors to go away instantly.
Could you tell me please if you have done steps 3 to 5 of the tutorial, where you create a config file, edit the CMakeLists file and then compile and build the program.
Yes, I have done those steps, and several times, just in case I mispelled something.
Still doesn't work, I've tried everything, but it seems as if the ../image_raw topic doesn't subscribe to the ../filtered one. And I don't get it to work.
Did you? Maybe I do something wrong in the Shell when I have to roslaunch and rosrun...
I don't own a Euclid unfortunately, so I have to imagine its workings in my head if something isn't in the documentation. Cheaper than a real Euclid, but harder to run accurate tests.
The roslaunch instruction in the tutorial is pretty standard for the Euclid, so there likely isn't a problem there. I assume the rosrun instruction to launch the script is also properly formatted in the tutorial.
So this brings us back to where we started. I'm guessing the point where you encounter problems is in step 5, when you try to view the image using
rosrun image_view image_view image:=/camera/color/filtered
It looks like what this does is to use ROS' 'Image View' instruction to view an image through the 'camera/color/filtered' filter that was supposed to be set up by the script in Step 2. So naturally it would be able to view it using the image_raw filter, since that topic already exists as a default option.
If this instruction in Step 5 cannot find the camera/color/filtered topic, then it suggests that there is a problem in Step 2 that prevented that filter from being assigned to the publisher.
If in doubt about whether an If function is causing problems, I delete that function for a moment and run the program. If nothing changes (i.e no new errors) then it is fair to assume that this particular instruction is not causing problems and you can eliminate it from your investigation and do Undo to restore the removed code, thus narrowing the number of possibilities for the cause of a problem. Working forensically and methodically with a process of elimination helps to solve very challenging bugs.