Xu4 + FlytOs + Pixhawk Camera Issue


#1

Hello I am a student and I am trying to get the visual followme app running on my system. However I do not see any feed or even an option to pick the camera in the first place. Using VLC media player on the flytos I am able to see through the camera, however I cannot get it to work with anything else.

All the guides claim its a super easy process and I have only experienced the opposite. I really am in above my head with this and my professor cant help me. I dont even know how to post any logs or anything to help you with specs! Its a logitech c170 webcam thats plugged in via USB, this is the video stream app that shows no options like the camera isnt even detected. Please help

P.S. on the guide it says to use this line;
roslaunch vision_apps object_tracking.launch global_namespace:=
is namespace the location of the ROS or something?


#2

Here are my options using the video streaming app


#3

Hi RBeattie,
The command
roslaunch vision_apps object_tracking.launch global_namespace:=<namespace>
is only for older versions of FlytOS. From what i see your FlytOS is new. In the newer version the command is run on its own when you click on start button.

To view the object tracking feed, try clicking on the start button and see if you get a video feed on the left hand side with settings to configure the object tracking parameters on the right.

If you dont get a feed, open the following debug link <ip>:8080 in your browser. This will show you a list of links. Try out the links one by one to see if you get a video feed from your camera.

If not then FlytOS failed to get the video feed from your camera. By default FlytOS is set to access video device with address /dev/video0/. if your camera is detected at a different address then it would not be accessed by FlytOS by default.

Also as stated by you, if you are able to view the camera feed in VLC on the system running FlytOS, then it would indicate that FlytOS did not capture the video device. if FlytOS is accessing the video device then you would not be able to access it through VLC as the device would be locked.

Now if you’ve confirmed that your video device is at different address than /dev/video0 then what you need to do is go to /flyt/flytos/flytcore/share/vision_apps/launch/cam_api.launch
There edit the third line which states the default video device as video0, to your device address.
Save and restart FlytOS. Now you should be able to view your camera feed.


#4

Hi RBeattle,
This App does not seem to be connected to your FlytOS system (top right corner).

In the app folder open the index.html file -> enter the IP of the system you have your FlytOS running -> connect -> Now it should show you the connected status on the top right corner.

Now try the drop down to view the list of video feeds available.


#5

Hello Vallbh,

Ok so :8080 does not work at all and in /followme Clicking the start button brings up the options on the right but largely does nothing

Here is from the LXterminal, hopefully this helps:
flytpod@flytpod:~$ sudo -s
[sudo] password for flytpod:
root@flytpod:~# /flyt/flytos/flytcore/share/vision_apps/launch/cam_api.launch
bash: /flyt/flytos/flytcore/share/vision_apps/launch/cam_api.launch: Permission denied
root@flytpod:~# roslaunch vision_apps cam_api.launch
… logging to /home/flytpod/.ros/log/42e07904-5dd7-11e7-a8a2-7cdd90b0ea76/roslaunch-flytpod-7883.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://flytpod:57473/

SUMMARY

PARAMETERS

  • /flytcam/bightness: 20
  • /flytcam/framerate: 30
  • /flytcam/image_height: 240
  • /flytcam/image_width: 320
  • /flytcam/pixel_format: yuyv
  • /flytcam/video_device: /dev/video0
  • /rosdistro: kinetic
  • /rosversion: 1.12.6

NODES
/
flytcam (usb_cam/usb_cam_node)
image_capture (vision_apps/image_capture)
web_video_server (web_video_server/web_video_server)

ROS_MASTER_URI=http://localhost:11311

core service [/rosout] found
process[flytcam-1]: started with pid [7915]
process[image_capture-2]: started with pid [7916]
/flyt/flytos/flytcore/lib/web_video_server/web_video_server: error while loading shared libraries: libopencv_core3.so.3.2: cannot open shared object file: No such file or directoryprocess[web_video_server-3]: started with pid [7917]

[web_video_server-3] process has died [pid 7917, exit code 127, cmd /flyt/flytos/flytcore/lib/web_video_server/web_video_server __name:=web_video_server __log:=/home/flytpod/.ros/log/42e07904-5dd7-11e7-a8a2-7cdd90b0ea76/web_video_server-3.log].
log file: /home/flytpod/.ros/log/42e07904-5dd7-11e7-a8a2-7cdd90b0ea76/web_video_server-3*.log
[ INFO] [1498861235.466557596]: using default calibration URL
[ INFO] [1498861235.467259009]: camera calibration URL: file:///home/flytpod/.ros/camera_info/head_camera.yaml
[ INFO] [1498861235.468630543]: Unable to open camera calibration file [/home/flytpod/.ros/camera_info/head_camera.yaml]
[ WARN] [1498861235.469143248]: Camera calibration file /home/flytpod/.ros/camera_info/head_camera.yaml not found.
[ INFO] [1498861235.470247743]: Starting ‘head_camera’ (/dev/video0) at 320x240 via mmap (yuyv) at 30 FPS
[ WARN] [1498861235.564455027]: unknown control ‘focus_auto’

Thank you for the help!
-Ryan


#6

Hi @RBeattie, could you please check that you are running the latest FlyOS version. You will get your installed version by running flytos_version.sh in terminal. Also could you let us know which device you are using?

Thanks,
Prabodh.


#7

Hello Prabodh,

Ok the version is 1.3-4c, I am not too sure what device you are referring too but its on the odroid-xu4 booted from EMMC. I am also using the pixhawk px4 and an logitech c170 series webcam connected via USB.

-Ryan


#8

Hi @RBeattie, it seems like you are running the latest version of FlytOS but your ros-kinetic installation is an older version. From FlytOS version 1.3 we use the latest version of the library libopencv_core which is 3.2.

In order to verify the problem please run the following command in your terminal
$ ls /opt/ros/kinetic/lib/ | grep libopencv_core3.so.3

If you see any library with the version 3.1, it is creating the issue. To rectify it please update the necessary libraries by running the following commands.
$ sudo apt-get update
$ sudo apt-get install --only-upgrade ros-kinetic-opencv3
$ sudo apt-get install --only-upgrade ros-kinetic-cv-bridge
$ sudo apt-get install --only-upgrade ros-kinetic-compressed-image-transport

I strongly suggest using the FlytOS Image to prevent any dependency issues and quick-start your project.

Cheers,
Prabodh.