How to get visual odometry from a Raspberry Pi Camera

asked 2019-03-18 05:58:31 -0500

MichielCab gravatar image

updated 2019-03-18 06:05:22 -0500

gvdhoorn gravatar image

Hi everyone,

I'm trying to obtain visual odometry by using a Raspberry Pi Camera V2. Firstly I have installed viso2, gscam, image_common, image_pipeline and vision_opencv in a map Odometry that I made in my catkin_ws. When I run the command catkin_make, everything is fine. So far, so good.

The next step I did was running the command: raspivid -n -w 640 -h 480 -b 1000000 -fps 40 -t 0 -o - | gst-launch-1.0 -v fdsrc ! h264parse ! rtph264pay config-interval=10 pt=96 ! udpsink host= port=9000, which gives me my first question. Do I fill in the IP-adres of my remote PC or my Raspberry Pi?

The next step I want to do is making a launch file called raspicam.launch. Therefore I used the following commands on my remote PC:

cd /odometry/src/gscam/examples
vi raspicam.launch

where I pasted the following: After saving it and running the command:

roslaunch gscam raspicam.launc

I get an error. (raspicam is neither a launch file nor a launch file name). How do I fix this? Thank you very much for your response, I appreciate it very much!!

edit retag flag offensive close merge delete

Comments

I don't get why you are running raspivid and gstreamer for the rpi camera. There is a perfectly running ros node for it.

Anyway more details of your setup needed, e.g. what nodes are running on your pc and what nodes are running on the pi. If you e.g. want to send the video from the pi camera to the pc with udp you need to give the IP of your pc to udpsink.

Humpelstilzchen gravatar image Humpelstilzchen  ( 2019-03-18 07:04:52 -0500 )edit

First and foremost thank you very much for your quick response. By using all those different packages I'm trying to get visual odometry from my raspberry to my remote pc. I solved my last error but now I'm getting a new one: "invalid roslaunch XML syntax:mismatched tag: line 7, colomn 6". Do you see what I'm doing wrong?

MichielCab gravatar image MichielCab  ( 2019-03-18 07:54:40 -0500 )edit

Need the xml file for that ;)

Humpelstilzchen gravatar image Humpelstilzchen  ( 2019-03-18 11:35:57 -0500 )edit