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

port image_rotate on ros2 #385

Merged
merged 4 commits into from
May 9, 2019

Conversation

yechun1
Copy link
Contributor

@yechun1 yechun1 commented Feb 20, 2019

  1. port image_rotate on ros2

    • replace nodelet(nodelet::Nodelet) with class_loader(rclcpp::Node)
    • use ros2param instead of dymanic_reconfigure
    • update image_transport APIs
    • use tf2 time with header.stamp operation
    • replace other ros APIs with ROS2 APIs

    for test: verified based on ros2_intel_realsense package as camera image input source.
    ros2 run image_rotate image_rotate image:=/camera/color/image_raw camera_info:=/camera/color/camera_info rotated/image:=/camera/color/image_raw_rotated
    (or by launch)
    ros2 launch image_rotate image_rotate.launch.py

    set param: by ros2param as rqt_reconfigure similar UI tool has not ported yet on ROS2
    ros2 param set /ImageRotateNode target_x 0.5

  2. modify code to follow ros2 coding style

@yechun1
Copy link
Contributor Author

yechun1 commented Feb 20, 2019

@mjcarroll image_rotate has been ported on ROS2, just update the APIs to ROS2 and the feature is keep the same with previous. I had verified based on ROS2 RealSense camera as raw image input. Would you please kindly help to review the code, many thanks.

@yechun1 yechun1 mentioned this pull request Feb 20, 2019
7 tasks
@mjcarroll
Copy link
Contributor

Great, I'll put this on my list to review.

I think that you'll also be interested to know that we are working on some launch improvements for composable nodes, which should directly impact some of the image_pipeline work.

@JWhitleyWork
Copy link
Collaborator

@yechun1 - Please rebase your branch on the ros2 branch. This will bring in fixes from melodic and the new CI.

yechun1 added 2 commits April 26, 2019 13:06
* replace nodelet(nodelet::Nodelet) with class_loader(rclcpp::Node)
* use ros2param instead of dymanic_reconfigure
* update image_transport APIs
* use tf2 time with header.stamp operation
* replace other ros APIs with ROS2 APIs

Test:
  1. Start camera, for example run ros2_intel_realsense as camera raw image input.
  2. run rviz2 to add two images with /camera/color/image_raw and /camera_color/image_raw_rotated
  3. ros2 run image_rotate image_rotate image:=/camera/color/image_raw camera_info:=/camera/color/camera_info rotated/image:=/camera/color/image_raw_rotated
    (or by launch) ros2 launch image_rotate image_rotate.launch.py
  4. Set param: by ros2param as rqt_reconfigure similar UI tool has not ported yet on ROS2
    ros2 param set /ImageRotateNode target_x 0.5
@yechun1 yechun1 force-pushed the ros2_image_rotate branch from 9991f4c to 7a3bb6a Compare April 26, 2019 05:11
@yechun1
Copy link
Contributor Author

yechun1 commented Apr 26, 2019

thanks for enable the CI, finished code rebase, please help review.

@yechun1
Copy link
Contributor Author

yechun1 commented Apr 26, 2019

Test:
  1. Start camera, for example run ros2_intel_realsense as camera raw image input.
  2. run rviz2 to add two images with /camera/color/image_raw and /camera_color/image_raw_rotated
  3. ros2 run image_rotate image_rotate image:=/camera/color/image_raw camera_info:=/camera/color/camera_info rotated/image:=/camera/color/image_raw_rotated
    (or by launch) ros2 launch image_rotate image_rotate.launch.py
  4. Set param: by ros2param as rqt_reconfigure similar UI tool has not ported yet on ROS2
    ros2 param set /ImageRotateNode target_x 0.5

Copy link
Collaborator

@JWhitleyWork JWhitleyWork left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My changes are mostly semantic and some are subjective. Let me know once you've looked them over and I'll approve.

image_rotate/CMakeLists.txt Outdated Show resolved Hide resolved
image_rotate/CMakeLists.txt Outdated Show resolved Hide resolved
image_rotate/CMakeLists.txt Show resolved Hide resolved
image_rotate/CMakeLists.txt Show resolved Hide resolved
image_rotate/include/image_rotate/image_rotate_nodelet.hpp Outdated Show resolved Hide resolved
image_rotate/package.xml Outdated Show resolved Hide resolved
image_rotate/src/node/image_rotate.cpp Outdated Show resolved Hide resolved
yechun1 added 2 commits April 29, 2019 14:05
Nodelet is probably not the correct designation for this anymore since there is no longer a concept of a "nodelet" in ROS2, use "_node" instead.

Signed-off-by: Chris Ye <chris.ye@intel.com>
@yechun1
Copy link
Contributor Author

yechun1 commented May 9, 2019

@JWhitleyAStuff thanks for nice comments, I have updated the changes, would you please review again?

@yechun1
Copy link
Contributor Author

yechun1 commented May 9, 2019

Hope this package could be merged and publish on ROS2 D release :)

@JWhitleyWork JWhitleyWork merged commit 8c09367 into ros-perception:ros2 May 9, 2019
@yechun1 yechun1 deleted the ros2_image_rotate branch May 10, 2019 00:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants