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

[ros2] Port multicamera to ros2 #939

merged 4 commits into from Aug 6, 2019


Copy link

commented Jun 21, 2019

Port gazebo_ros_multicamera plugin to ROS2.


<plugin name="camera_controller" filename="">
      <!-- topics need to be prefixed with camera_name for remapping -->

  <!-- frame_name>omit so it defaults to link name</frameName-->

Instead of a new plugin, multicamera has been integrated into gazebo_ros_camera. To use it as multicamera, <sensor_type> has to be specified as 2. It also includes gazebo_ros_triggered_multicamera

@chapulina chapulina self-requested a review Jun 21, 2019

@chapulina chapulina added the ros2 label Jun 21, 2019


This comment has been minimized.

Copy link

commented Jul 15, 2019

Now that #932 has been merged, this needs rebasing

@shiveshkhaitan shiveshkhaitan force-pushed the shiveshkhaitan:multicamera branch from 768a760 to c377a96 Jul 16, 2019

Copy link

left a comment

Works for me! The requests for changes are minimal, the only critical one is changing the plugin namespace.

gazebo_plugins/src/MultiCameraPlugin.cpp Outdated Show resolved Hide resolved
gazebo_plugins/src/MultiCameraPlugin.cpp Outdated Show resolved Hide resolved
#include "gazebo/rendering/Camera.hh"
#include "gazebo/util/system.hh"

namespace gazebo

This comment has been minimized.

Copy link

chapulina Jul 27, 2019


Can we put this plugin in the gazebo_plugins namespace? Just in case someone creates the same plugin for Gazebo in the future.

In fact, feel free to make a pull request adding this plugin to Gazebo 9 if you have time. It would be just a matter of copying this and the cc file over, and making a couple tweaks to follow Gazebo's style guide (which is different from ROS 2).

I can help you out with style changes for you since I'm used to it. Some things I can already see:

  • rename .hpp to .hh and .cpp to .cc
  • Use camelCase (i.e. cameraNum)
  • Prefix all arguments with _ (i.e. _cameraNum)
  • There should be one public / protected / private per member
  • { in a new line

The only problem is that even if we release this plugin for Gazebo 9.X, it won't be available to most ROS users, which use Gazebo 9.0.0 from Ubuntu. So we woudn't be able to use it in gazebo_ros_pkgs's debian packages 😕

This comment has been minimized.

Copy link

shiveshkhaitan Aug 3, 2019


I will be making the PR soon

gazebo_plugins/src/gazebo_ros_camera.cpp Show resolved Hide resolved
shiveshkhaitan and others added 2 commits Aug 3, 2019
frameName -> frame_name
Signed-off-by: Louise Poubel <>

This comment has been minimized.

Copy link

commented Aug 6, 2019

LGTM. We could backport this to dashing.

@chapulina chapulina merged commit e29cb14 into ros-simulation:ros2 Aug 6, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.