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 elevator to ROS2 #945

merged 1 commit into from Jul 11, 2019


Copy link

commented Jul 4, 2019

Port gazebo_ros_elevator plugin to ROS2.


 <plugin name="elevator" filename="">


  <!-- Time the elevator door will stay open in seconds -->

Migration guide at ROS 2 Migration: Elevator

@chapulina chapulina added the ros2 label Jul 8, 2019

@chapulina chapulina self-requested a review Jul 8, 2019

Copy link

left a comment

Works for me!

I noticed that the elevator sometimes doesn't respond to commands. I needed to send a command a couple of times before it moved. But the problem seems to be in the Gazebo plugin, because I checked that the MoveToFloor commands are going through.


impl_->top_ = _sdf->Get<int>("top_floor", std::numeric_limits<int>::max()).first;

void GazeboRosElevator::OnElevator(const std_msgs::msg::String::ConstSharedPtr msg)

This comment has been minimized.

Copy link

chapulina Jul 11, 2019


So strange that the original plugin takes a string when we need an int 🤔 We could easily change this to Int32 for a cleaner implementation.

I wonder if it was done like this because Gazebo's ElevatorPlugin uses a string message. And the reason for that is that gazebo::msgs doesn't have an integer message...

@chapulina chapulina merged commit 22d782e into ros-simulation:dashing Jul 11, 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.