Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[doc] Add insta360 air camera doc #2544

Merged
merged 9 commits into from
Nov 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added doc/images/insta360_air_sample.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ The code is open source, and `available on github`_.
install_ensenso
install_structure_core
install_elp_usb_4k
install_insta360_air
install_chainer_gpu
install_pcl_from_source
deep_learning_with_image_dataset/overview
Expand Down
22 changes: 22 additions & 0 deletions doc/install_insta360_air.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Install Insta360 Air

- Insta360 Air:[https://www.insta360.com/jp/product/insta360-air](https://www.insta360.com/jp/product/insta360-air)
- libuvc_camera: [http://wiki.ros.org/libuvc_camera](http://wiki.ros.org/libuvc_camera)

![Insta360 Air](./images/insta360_air_sample.png)

## Install Udev

```bash
roscd jsk_perception
sudo cp udev/99-insta360-air.rules /etc/udev/rules.d/
sudo service udev restart
```

## Sample

```bash
roslaunch jsk_perception sample_insta360_air.launch
# For indigo or lower
roslaunch jsk_perception sample_insta360_air.launch use_usb_cam:=true
```
22 changes: 22 additions & 0 deletions jsk_perception/launch/usb_cam.launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<launch>
<arg name="camera_name" />
<arg name="video_device" />
<arg name="height" />
<arg name="width" />
<arg name="video_mode" />
<arg name="frame_rate" />
<arg name="gui" default="false" />

<node pkg="usb_cam" type="usb_cam_node" name="$(arg camera_name)">
<rosparam subst_value="true">
video_device: $(arg video_device)
image_height: $(arg height)
image_width: $(arg width)
pixel_format: $(arg video_mode)
framerate: $(arg frame_rate)
</rosparam>
</node>

<node name="$(anon image_view)" pkg="image_view" type="image_view"
args="image:=$(arg camera_name)/image_raw" if="$(arg gui)" />
</launch>
34 changes: 34 additions & 0 deletions jsk_perception/sample/sample_insta360_air.launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<launch>
<arg name="use_usb_cam" default="false" />
<arg name="camera_name" default="insta360" />
<arg name="vendor" default="0x2e1a" />
<arg name="product" default="0x1000"/>
<arg name="width" default="3008" />
<arg name="height" default="1504" />
<arg name="video_mode" default="mjpeg" />
<arg name="frame_rate" default="30" />
<arg name="gui" default="true" />

<include unless="$(arg use_usb_cam)" file="$(find jsk_perception)/launch/libuvc_camera.launch">
<arg name="camera_name" value="$(arg camera_name)" />
<arg name="vendor" value="$(arg vendor)" />
<arg name="product" value="$(arg product)" />
<arg name="height" value="$(arg height)" />
<arg name="width" value="$(arg width)" />
<arg name="video_mode" value="$(arg video_mode)" />
<arg name="frame_rate" value="$(arg frame_rate)" />
<arg name="gui" value="$(arg gui)" />
</include>

<!-- For indigo or older -->
<include if="$(arg use_usb_cam)" file="$(find jsk_perception)/launch/usb_cam.launch">
<arg name="camera_name" value="$(arg camera_name)" />
<arg name="video_device" value="/dev/insta360" />
<arg name="height" value="$(arg height)" />
<arg name="width" value="$(arg width)" />
<arg name="video_mode" value="$(arg video_mode)" />
<arg name="frame_rate" value="$(arg frame_rate)" />
<arg name="gui" value="$(arg gui)" />
</include>

</launch>
5 changes: 5 additions & 0 deletions jsk_perception/udev/99-insta360-air.rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# For /dev/video*
KERNEL=="video[0-9]*", SUBSYSTEM=="video4linux", ATTR{index}=="0", ATTRS{idVendor}=="2e1a", ATTRS{idProduct}=="1000", MODE="0666", SYMLINK+="insta360"

# For /dev/bus/usb/*
SUBSYSTEMS=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="2e1a", ATTRS{idProduct}=="1000", MODE="0666"