A simple subscriber for a camera topic?

asked 2018-02-11 15:23:34 -0500

sdcguy gravatar image

So I am pretty new to ROS and have very little experience with it. I am working with a simulator for autonomous cars for a project. The simulator is called Truevision. So, the car in the simulator has cameras attached to it. I want to subscribe to the cameras and save the image from the camera in a folder. I have been looking all over for something like that and have been trying to make a node myself but nothing seems to be working. The publisher I want to subscribe to is this: /truevision/camera/front_right How do I do it?

edit retag flag offensive close merge delete

Comments

1

Welcome!

[I] have been trying to make a node myself but nothing seems to be working

What does this mean? What have you tried (examples please) and what were the results (terminal output if possible)?

jayess gravatar image jayess  ( 2018-02-11 17:38:14 -0500 )edit

I tried following the tutorials given on the ROS website. I pretty much copied the code and changed up the topic name. But the code would give me a syntax error. and I tried the code provided here https://gist.github.com/rethink-imcma... this one ran but didn't do anything

sdcguy gravatar image sdcguy  ( 2018-02-11 17:45:56 -0500 )edit
2

Can you update your question with a copy and paste of the error and what you've tried so far? It's easier to help when the question has some code and errors.

jayess gravatar image jayess  ( 2018-02-11 17:49:16 -0500 )edit

@sdcguy: which particular tutorial have you followed? The wiki/image_transport - Writing a Simple Image Subscriber (C++) tutorial should be the easiest way to subscribe to images (in C++, that is).

gvdhoorn gravatar image gvdhoorn  ( 2018-02-12 00:53:56 -0500 )edit