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

Bump for release 0.8.0, update docs #301

Merged
merged 1 commit into from
Dec 5, 2023
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
58 changes: 58 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,64 @@
Changelog for package usb_cam
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

0.8.0 (2023-12-04)
------------------
* Bump for release 0.8.0, update docs
* Merge pull request `#300 <https://github.com/ros-drivers/usb_cam/issues/300>`_ from ros-drivers/263-check-if-specified-pixel-format-is-supported
263 check if specified pixel format is supported
* Check if specified pixel format is supported by driver and by device
- Also fix typo in params_2 yaml file
- fix linter errors too
* Add v4l2_str method to pixel_format_base class
* Add common arguments strut to pixel format classes
- Use common arguments struct in all format classes
* Merge pull request `#292 <https://github.com/ros-drivers/usb_cam/issues/292>`_ from ros-drivers/288-fix-uyvy2rgb-size
288 fix uyvy2rgb size
* Merge pull request `#270 <https://github.com/ros-drivers/usb_cam/issues/270>`_ from boitumeloruf/raw-mjpeg-stream
Publish raw mjpeg stream directly via compressed image topic
* Introduced funtions get\_..._from_av_format, fixed code style errors
* Merge branch 'ros2' into raw-mjpeg-stream
* fixed minor build issues
* Merge branch 'ros2' into raw-mjpeg-stream
* Merge branch 'ros2' of https://github.com/boitumeloruf/usb_cam into ros2
* Merge pull request `#295 <https://github.com/ros-drivers/usb_cam/issues/295>`_ from ros-drivers/run-ci-on-ros2-branch-too
Run CI on ros2 branch pushes too
* Bump checkout action to latest
* Ensure ROS_VERSION is set for ROS build farms
* Run CI on ros2 branch pushes too
* Merge pull request `#294 <https://github.com/ros-drivers/usb_cam/issues/294>`_ from ros-drivers/291-auto-generate-ci-matrix
Auto generate ci matrix
* Continue on error for ROS 1 build and test job
* Hard-code noetic to actions matrix step until 2025
* Handle rolling case where two docker images are listed
* Switch to tagged version of the active_ros_distros script
* Add basic ROS 1 node, update CMakelists and package.xml
* Update CI to automatically generate distro matrix
* Merge pull request `#293 <https://github.com/ros-drivers/usb_cam/issues/293>`_ from ros-drivers/add-mjpeg-device-format-param
Add mjpeg device format param
* fixed cppcheck and uncrustify errors
* Refactored use of av_device_format
* Updated example YAML files to av_device_format
* Added av_device_format parameter
* Fix bytes per line logic for base image class
* Fix number of channels for uyvy2rgb format
* Merge pull request `#286 <https://github.com/ros-drivers/usb_cam/issues/286>`_ from ros-drivers/285-handle-unavailable-device
285 handle unavailable device, list available v4l2 devices
* Fix manual triggering of CI pipelines
* Check if given v4l2 device exists before opening it
* fixed cppcheck and uncrustify errors
* Merge pull request `#282 <https://github.com/ros-drivers/usb_cam/issues/282>`_ from flynneva/ros2-prepare-release
Bump to 0.7.0, generate CHANGELOG
* Merge branch 'ros2' into raw-mjpeg-stream
* Fix seg fault when unref av_packet using av_codec < 58.133.100
* Merge branch 'ros2' into raw-mjpeg-stream
* Refactored use of av_device_format
* Merge branch 'ros-drivers:ros2' into ros2
* Added feature to access raw mjpeg stream and publish directly on compressed image topic
* Updated example YAML files to av_device_format
* Added av_device_format parameter
* Contributors: Boitumelo Ruf, Evan Flynn

0.7.0 (2023-08-30)
------------------
* Fix mjpeg invalid ptr and mjpeg memory leak
Expand Down
66 changes: 32 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ For either MacOS or Windows - if you would like to try and get it working please

Assuming you have a supported ROS 2 distro installed, run the following command to install the binary release:

```bash
```shell
sudo apt-get install ros-<ros2-distro>-usb-cam
```

Expand All @@ -30,7 +30,7 @@ If for some reason you cannot install the binaries, follow the directions below

Clone/Download the source code into your workspace:

```
```shell
cd /path/to/colcon_ws/src
git clone https://github.com/ros-drivers/usb_cam.git
```
Expand All @@ -39,14 +39,14 @@ Or click on the green "Download zip" button on the repo's github webpage.

Once downloaded and ensuring you have sourced your ROS 2 underlay, go ahead and install the dependencies:

```
```shell
cd /path/to/colcon_ws
rosdep install --from-paths src --ignore-src -y
```

From there you should have all the necessary dependencies installed to compile the `usb_cam` package:

```
```shell
cd /path/to/colcon_ws
colcon build
source /path/to/colcon_ws/install/setup.bash
Expand All @@ -68,7 +68,7 @@ The commands to run each of these different ways of starting the node are shown

**NOTE: you only need to run ONE of the commands below to run the node**

```
```shell
# run the executable with default settings (without params file)
ros2 run usb_cam usb_cam_node_exe

Expand All @@ -83,7 +83,7 @@ ros2 launch usb_cam camera.launch.py

To launch multiple nodes at once, simply remap the namespace of each one:

```
```shell
ros2 run usb_cam usb_cam_node_exe --remap __ns:=/usb_cam_0 --params-file /path/to/usb_cam/config/params_0.yaml
ros2 run usb_cam usb_cam_node_exe --remap __ns:=/usb_cam_1 --params-file /path/to/usb_cam/config/params_1.yaml
```
Expand All @@ -96,20 +96,20 @@ To see a connected devices supported formats, run the `usb_cam_node` and observe

An example output is:

```
[INFO] [1680452417.506838265] [usb_cam]: This devices supproted formats:
[INFO] [1680452417.507199183] [usb_cam]: Motion-JPEG: 1280 x 720 (30 Hz)
[INFO] [1680452417.507225494] [usb_cam]: Motion-JPEG: 960 x 540 (30 Hz)
[INFO] [1680452417.507239725] [usb_cam]: Motion-JPEG: 848 x 480 (30 Hz)
[INFO] [1680452417.507252414] [usb_cam]: Motion-JPEG: 640 x 480 (30 Hz)
[INFO] [1680452417.507269112] [usb_cam]: Motion-JPEG: 640 x 360 (30 Hz)
[INFO] [1680452417.507281981] [usb_cam]: YUYV 4:2:2: 640 x 480 (30 Hz)
[INFO] [1680452417.507296745] [usb_cam]: YUYV 4:2:2: 1280 x 720 (10 Hz)
[INFO] [1680452417.507311292] [usb_cam]: YUYV 4:2:2: 640 x 360 (30 Hz)
[INFO] [1680452417.507325806] [usb_cam]: YUYV 4:2:2: 424 x 240 (30 Hz)
[INFO] [1680452417.507339344] [usb_cam]: YUYV 4:2:2: 320 x 240 (30 Hz)
[INFO] [1680452417.507354164] [usb_cam]: YUYV 4:2:2: 320 x 180 (30 Hz)
[INFO] [1680452417.507368658] [usb_cam]: YUYV 4:2:2: 160 x 120 (30 Hz)
```log
This devices supproted formats:
Motion-JPEG: 1280 x 720 (30 Hz)
Motion-JPEG: 960 x 540 (30 Hz)
Motion-JPEG: 848 x 480 (30 Hz)
Motion-JPEG: 640 x 480 (30 Hz)
Motion-JPEG: 640 x 360 (30 Hz)
YUYV 4:2:2: 640 x 480 (30 Hz)
YUYV 4:2:2: 1280 x 720 (10 Hz)
YUYV 4:2:2: 640 x 360 (30 Hz)
YUYV 4:2:2: 424 x 240 (30 Hz)
YUYV 4:2:2: 320 x 240 (30 Hz)
YUYV 4:2:2: 320 x 180 (30 Hz)
YUYV 4:2:2: 160 x 120 (30 Hz)
```

### Driver supported formats
Expand All @@ -120,18 +120,14 @@ for details.
After observing [the devices supported formats](#device-supported-formats), specify which
format to use via [the parameters file](config/params.yaml) with the `pixel_format` parameter.

Possible options for this driver today are:
To see a list of all currently supported driver formats, run the following command:

- `yuyv2rgb`: V4L2 capture format of YUYV, ROS image encoding of RGB8
- `uyvy2rgb`: V4L2 capture format of UYVY, ROS image encoding of RGB8
- `mjpeg2rgb`: V4L2 capture format of MJPEG, ROS image encoding of RGB8
- `rgb8`: V4L2 capture format and ROS image encoding format of RGB8
- `yuyv`: V4L2 capture format and ROS image encoding format of YUYV
- `uyvy`: V4L2 capture format and ROS image encoding format of UYVY
- `m4202rgb8`: V4L2 capture format of M420 (aka YUV420), ROS image encoding of RGB8
- `mono8`: V4L2 capture format and ROS image encoding format of MONO8
- `mono16`: V4L2 capture format and ROS image encoding format of MONO16
- `y102mono8`: V4L2 capture format of Y10 (aka MONO10), ROS image encoding of MONO8
```shell
ros2 run usb_cam usb_cam_node_exe --ros-args -p pixel_format:="test"
```

Note: "test" here could be replaced with any non-supported pixel format string. The driver
will detect if the given pixel format is supported or not.

More formats and conversions can be added, contributions welcome!

Expand All @@ -154,7 +150,7 @@ The `usb_cam` should support compression by default since it uses `image_transpo

Unfortunately `rviz2` and `show_image.py` do not support visualizing the compressed images just yet so you will need to republish the compressed image downstream to uncompress it:

```
```shell
ros2 run image_transport republish compressed raw --ros-args --remap in/compressed:=image_raw/compressed --remap out:=image_raw/uncompressed
```

Expand All @@ -165,13 +161,13 @@ is a flag to add these compile commands to the targets.

To enable them, pass in the `SANITIZE=1` flag:

```
```shell
colcon build --packages-select usb_cam --cmake-args -DSANITIZE=1
```

Once built, run the nodes executable directly and pass any `ASAN_OPTIONS` that are needed:

```
```shell
ASAN_OPTIONS=new_delete_type_mismatch=0 ./install/usb_cam/lib/usb_cam/usb_cam_node_exe
```

Expand All @@ -185,7 +181,9 @@ down performance.
[Doxygen](http://docs.ros.org/indigo/api/usb_cam/html/) files can be found on the ROS wiki.

### License

usb_cam is released with a BSD license. For full terms and conditions, see the [LICENSE](LICENSE) file.

### Authors

See the [AUTHORS](AUTHORS.md) file for a full list of contributors.
2 changes: 1 addition & 1 deletion package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>usb_cam</name>
<version>0.7.0</version>
<version>0.8.0</version>
<description>A ROS Driver for V4L USB Cameras</description>

<maintainer email="evanflynn.msu@gmail.com">Evan Flynn</maintainer>
Expand Down
Loading