mirror of
https://github.com/CopterExpress/clover.git
synced 2026-05-27 05:29:32 +00:00
Add launching FPV camera to the launch-file
This commit is contained in:
@@ -6,6 +6,8 @@
|
||||
<arg name="web_video_server" default="true"/>
|
||||
<arg name="rosbridge" default="true"/>
|
||||
<arg name="camera" default="false"/>
|
||||
<arg name="fpv_camera" default="true"/>
|
||||
<arg name="fpv_camera_device" default="/dev/v4l/by-id/usb-HD_Camera_Manufacturer_USB_2.0_Camera-video-index0"/>
|
||||
|
||||
<!-- mavros -->
|
||||
<include file="$(find clever)/launch/mavros.launch">
|
||||
@@ -29,4 +31,9 @@
|
||||
|
||||
<!-- rosbridge -->
|
||||
<include file="$(find rosbridge_server)/launch/rosbridge_websocket.launch" if="$(arg rosbridge)"/>
|
||||
|
||||
<!-- FPV video streaming -->
|
||||
<include file="$(find clever)/launch/fpv_camera.launch" if="$(arg fpv_camera)">
|
||||
<arg name="device" value="$(arg fpv_camera_device)"/>
|
||||
</include>
|
||||
</launch>
|
||||
|
||||
6
clever/launch/fpv_camera.launch
Normal file
6
clever/launch/fpv_camera.launch
Normal file
@@ -0,0 +1,6 @@
|
||||
<launch>
|
||||
<arg name="device"/>
|
||||
<arg name="port" default="9999"/>
|
||||
|
||||
<node name="fpv_camera" pkg="clever" type="fpv_camera" args="$(arg device) $(arg port)" output="screen"/>
|
||||
</launch>
|
||||
8
clever/src/fpv_camera
Normal file
8
clever/src/fpv_camera
Normal file
@@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Usage
|
||||
# fpv_camera <video_device> <http port>
|
||||
|
||||
echo "Starting FPV camera $1 on :$2"
|
||||
cd /home/pi/mjpg-streamer/mjpg-streamer-experimental
|
||||
./mjpg_streamer -i "./input_uvc.so -d $1 -r 1024x720 -f 30" -o "./output_http.so -w ./www -p $2"
|
||||
Reference in New Issue
Block a user