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

Image bridge using image_transport #34

Merged
merged 5 commits into from
Aug 2, 2019
Merged

Image bridge using image_transport #34

merged 5 commits into from
Aug 2, 2019

Conversation

chapulina
Copy link
Contributor

@chapulina chapulina commented Aug 1, 2019

We've been bridging images directly with ros1_ign_bridge, but for some use cases, it's interesting to bring the power of image_transport and its plugins for features like compression.

This PR adds a new package, ros1_ign_image, which is documented on its README.

Also check out the new demo on ros1_ign_gazebo_demos that exercises the new package.

find_package(rostest REQUIRED)

set(test_publishers
ign_publisher
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm getting a few errors about target name conflicts with the ones declared in ros1_ign_bridge when building the workspace using catkin_make

I just had to change the target name. This worked for me:

diff --git a/ros1_ign_image/CMakeLists.txt b/ros1_ign_image/CMakeLists.txt
index 03d926c..e80fbd2 100644
--- a/ros1_ign_image/CMakeLists.txt
+++ b/ros1_ign_image/CMakeLists.txt
@@ -56,10 +56,10 @@ set(test_subscribers
 )
 
 foreach(test_publisher ${test_publishers})
-  add_executable(${test_publisher}
+  add_executable(${test_publisher}_image
     test/publishers/${test_publisher}.cpp
   )
-  target_link_libraries(${test_publisher}
+  target_link_libraries(${test_publisher}_image
     ${catkin_LIBRARIES}
     ignition-msgs${IGN_MSGS_VER}::core
     ignition-transport${IGN_TRANSPORT_VER}::core
@@ -69,10 +69,10 @@ foreach(test_publisher ${test_publishers})
 endforeach(test_publisher)
 
 foreach(test_subscriber ${test_subscribers})
-  add_rostest_gtest(test_${test_subscriber}
+  add_rostest_gtest(test_${test_subscriber}_image
     test/${test_subscriber}.test
     test/subscribers/${test_subscriber}.cpp)
-  target_link_libraries(test_${test_subscriber}
+  target_link_libraries(test_${test_subscriber}_image
     ${catkin_LIBRARIES}
     ignition-msgs${IGN_MSGS_VER}::core
     ignition-transport${IGN_TRANSPORT_VER}::core
diff --git a/ros1_ign_image/test/launch/test_ros1_subscriber.launch b/ros1_ign_image/test/launch/test_ros1_subscriber.launch
index 963baec..b280f65 100644
--- a/ros1_ign_image/test/launch/test_ros1_subscriber.launch
+++ b/ros1_ign_image/test/launch/test_ros1_subscriber.launch
@@ -7,6 +7,6 @@
   />
 
   <!-- Launch the Ignition Transport publisher -->
-  <node name="ign_publisher" pkg="ros1_ign_image" type="ign_publisher" />
+  <node name="ign_publisher" pkg="ros1_ign_image" type="ign_publisher_image" />
 
 </launch>
diff --git a/ros1_ign_image/test/ros1_subscriber.test b/ros1_ign_image/test/ros1_subscriber.test
index 6c43831..a32d713 100644
--- a/ros1_ign_image/test/ros1_subscriber.test
+++ b/ros1_ign_image/test/ros1_subscriber.test
@@ -4,6 +4,6 @@
   <include file="$(find ros1_ign_image)/test/launch/test_ros1_subscriber.launch">
   </include>
 
-  <test test-name="ign_ros1" pkg="ros1_ign_image" type="test_ros1_subscriber" time-limit="60.0" />
+  <test test-name="ign_ros1" pkg="ros1_ign_image" type="test_ros1_subscriber_image" time-limit="60.0" />
 
 </launch>

Copy link
Contributor Author

@chapulina chapulina Aug 2, 2019

Choose a reason for hiding this comment

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

Interesting, colcon must keep tests isolated even with merge-install. Added your changes: c7d6fab

Signed-off-by: Louise Poubel <louise@openrobotics.org>
Signed-off-by: Louise Poubel <louise@openrobotics.org>
@chapulina
Copy link
Contributor Author

Reverted some README changes from #32 acbb6ed

@chapulina chapulina merged commit 438da3b into master Aug 2, 2019
@chapulina chapulina deleted the image branch August 2, 2019 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants