forked from ros-perception/image_pipeline
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'ros-perception:rolling' into rolling
- Loading branch information
Showing
30 changed files
with
572 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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>image_pipeline</name> | ||
<version>6.0.5</version> | ||
<version>6.0.6</version> | ||
<description>image_pipeline fills the gap between getting raw images from a camera driver and higher-level vision processing.</description> | ||
|
||
<maintainer email="[email protected]">Vincent Rabaud</maintainer> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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>image_proc</name> | ||
<version>6.0.5</version> | ||
<version>6.0.6</version> | ||
<description>Single image rectification and color processing.</description> | ||
|
||
<maintainer email="[email protected]">Vincent Rabaud</maintainer> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,22 @@ | |
Changelog for package image_rotate | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
6.0.6 (2024-12-11) | ||
------------------ | ||
* add image_flip node (`#942 <https://github.com/ros-perception/image_pipeline/issues/942>`_) | ||
This is a continuation of | ||
https://github.com/ros-perception/image_pipeline/pull/756: | ||
* [x] Squashed 16 commits in original PR for ease of rebase/review | ||
* [x] Moved node into image_rotate package | ||
* [x] Added lazy subscriber | ||
* [x] Removes QoS parameters - will add proper QoS overrides in a | ||
different PR (when we do the same for image_rotate) | ||
* [x] Adds documentation | ||
--------- | ||
Co-authored-by: David Conner <[email protected]> | ||
Co-authored-by: Alejandro Hernández Cordero <[email protected]> | ||
* Contributors: Michael Ferguson | ||
|
||
6.0.5 (2024-10-30) | ||
------------------ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
// Copyright (c) 2022, CHRISLab, Christopher Newport University | ||
// Copyright (c) 2008, Willow Garage, Inc. | ||
// All rights reserved. | ||
// | ||
// Software License Agreement (BSD License 2.0) | ||
// | ||
// Redistribution and use in source and binary forms, with or without | ||
// modification, are permitted provided that the following conditions | ||
// are met: | ||
// | ||
// * Redistributions of source code must retain the above copyright | ||
// notice, this list of conditions and the following disclaimer. | ||
// * Redistributions in binary form must reproduce the above | ||
// copyright notice, this list of conditions and the following | ||
// disclaimer in the documentation and/or other materials provided | ||
// with the distribution. | ||
// * Neither the name of the Willow Garage nor the names of its | ||
// contributors may be used to endorse or promote products derived | ||
// from this software without specific prior written permission. | ||
// | ||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS | ||
// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE | ||
// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, | ||
// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN | ||
// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
// POSSIBILITY OF SUCH DAMAGE. | ||
|
||
#ifndef IMAGE_ROTATE__IMAGE_FLIP_HPP_ | ||
#define IMAGE_ROTATE__IMAGE_FLIP_HPP_ | ||
|
||
#include <math.h> | ||
|
||
#include <tf2_ros/buffer.h> | ||
#include <tf2_ros/transform_listener.h> | ||
#include <tf2_ros/static_transform_broadcaster.h> | ||
|
||
#include <memory> | ||
#include <string> | ||
|
||
#include <cv_bridge/cv_bridge.hpp> | ||
#include <image_transport/image_transport.hpp> | ||
#include <rclcpp/rclcpp.hpp> | ||
#include <tf2_geometry_msgs/tf2_geometry_msgs.hpp> | ||
|
||
#include "image_rotate/visibility.h" | ||
|
||
namespace image_rotate | ||
{ | ||
|
||
struct ImageFlipConfig | ||
{ | ||
std::string output_frame_id; | ||
int rotation_steps; | ||
bool use_camera_info; | ||
}; | ||
|
||
class ImageFlipNode : public rclcpp::Node | ||
{ | ||
public: | ||
IMAGE_ROTATE_PUBLIC ImageFlipNode(rclcpp::NodeOptions options); | ||
|
||
private: | ||
const std::string frameWithDefault(const std::string & frame, const std::string & image_frame); | ||
void imageCallbackWithInfo( | ||
const sensor_msgs::msg::Image::ConstSharedPtr & msg, | ||
const sensor_msgs::msg::CameraInfo::ConstSharedPtr & cam_info); | ||
void imageCallback(const sensor_msgs::msg::Image::ConstSharedPtr & msg); | ||
void do_work( | ||
const sensor_msgs::msg::Image::ConstSharedPtr & msg, | ||
const sensor_msgs::msg::CameraInfo::ConstSharedPtr & cam_info, | ||
const std::string input_frame_from_msg); | ||
void onInit(); | ||
|
||
rclcpp::Node::OnSetParametersCallbackHandle::SharedPtr on_set_parameters_callback_handle_; | ||
|
||
std::shared_ptr<tf2_ros::Buffer> tf_buffer_; | ||
std::shared_ptr<tf2_ros::TransformListener> tf_sub_; | ||
std::shared_ptr<tf2_ros::StaticTransformBroadcaster> tf_pub_; | ||
bool tf_unpublished_; | ||
|
||
ImageFlipConfig config_; | ||
|
||
// Subscriber - only one is used at a time - depends on use_camera_info | ||
image_transport::Subscriber img_sub_; | ||
image_transport::CameraSubscriber cam_sub_; | ||
|
||
// Publisher - only one is used at a time - depends on use_camera_info | ||
image_transport::Publisher img_pub_; | ||
image_transport::CameraPublisher cam_pub_; | ||
|
||
double angle_; | ||
tf2::TimePoint prev_stamp_; | ||
geometry_msgs::msg::TransformStamped transform_; | ||
}; | ||
} // namespace image_rotate | ||
|
||
#endif // IMAGE_ROTATE__IMAGE_FLIP_HPP_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Copyright (c) 2022, CHRISLab, Christopher Newport University | ||
# All rights reserved. | ||
# | ||
# Software License Agreement (BSD License 2.0) | ||
# | ||
# Redistribution and use in source and binary forms, with or without | ||
# modification, are permitted provided that the following conditions | ||
# are met: | ||
# | ||
# * Redistributions of source code must retain the above copyright | ||
# notice, this list of conditions and the following disclaimer. | ||
# * Redistributions in binary form must reproduce the above | ||
# copyright notice, this list of conditions and the following | ||
# disclaimer in the documentation and/or other materials provided | ||
# with the distribution. | ||
# * Neither the name of the Willow Garage nor the names of its | ||
# contributors may be used to endorse or promote products derived | ||
# from this software without specific prior written permission. | ||
# | ||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS | ||
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE | ||
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, | ||
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN | ||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
# POSSIBILITY OF SUCH DAMAGE. | ||
|
||
"""Demonstration of basic launch of the image_flip_node with remappings.""" | ||
|
||
from launch import LaunchDescription | ||
import launch_ros.actions | ||
|
||
|
||
def generate_launch_description(): | ||
"""Launch description for basic launch of the image_flip.""" | ||
return LaunchDescription([ | ||
launch_ros.actions.Node( | ||
package='image_rotate', executable='image_flip', | ||
output='screen', name='camera_flip', | ||
remappings=[('image', 'camera/rgb/image_raw'), | ||
('rotated/image', 'camera_rotated/image_rotated')], | ||
parameters=[{'output_frame_id': 'camera_rotated', | ||
'rotation_steps': 2, | ||
'use_camera_info': True}])]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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>image_rotate</name> | ||
<version>6.0.5</version> | ||
<version>6.0.6</version> | ||
<description> | ||
<p> | ||
Contains a node that rotates an image stream in a way that minimizes | ||
|
@@ -34,6 +34,7 @@ | |
<url type="bugtracker">https://github.com/ros-perception/image_pipeline/issues</url> | ||
<url type="repository">https://github.com/ros-perception/image_pipeline</url> | ||
<author>Blaise Gassend</author> | ||
<author email="[email protected]">David Conner</author> | ||
|
||
<buildtool_depend>ament_cmake_auto</buildtool_depend> | ||
|
||
|
Oops, something went wrong.