ros-simulation / gazebo_ros_pkgs

Wrappers, tools and additional API's for using ROS with Gazebo
http://wiki.ros.org/gazebo_ros_pkgs
782 stars 773 forks source link

Problem migrating a pluging to gazebo_ros_pkgs #21

Closed piyushk closed 11 years ago

piyushk commented 11 years ago

I have a simple differential drive plugin here based on the original differential drive plugin from the erratic_robot package: https://github.com/utexas-bwi/segbot_simulator/blob/master/segbot_gazebo_plugins/src/diff_drive_plugin.cc

This works as expected with simulator_gazebo-1.7.12 (Gazebo 1.5), but getWorldPose() seems to be returning ~0 for position with Gazebo 1.8.6. The position does not change even slightly over time, and the orientation changes somewhat arbitrarily.:

pose: 
  pose: 
    position: 
      x: 6.91499350184e-310
      y: 6.91499350199e-310
      z: 0.0

On the other hand /gazebo/get_model/state seems to be returning the correct value. Since it uses the getWorldPose under the hood, I am not sure what the difference is. I am also unsure whether this is an upstream issue or not, but it is something that might be nice to document in gazebo_ros_pkgs migration.

davetcoleman commented 11 years ago

Piyush, it would be great to merge this Gazebo plugin into gazebo_ros_pkgs once we get it working, please send a pull request!

As to the getWorldPose() question, this is an upstream Gazebo question I'll defer to @hsu

piyushk commented 11 years ago

@davetcoleman I will do that. There are a couple of other useful plugins in there that should be useful for the general community as well.

@hsu Should I open an issue report upstream for this?

hsu commented 11 years ago

@piyushk yes, please create an issue upstream in gazebo. Thanks.

piyushk commented 11 years ago

Upstream Issue: https://bitbucket.org/osrf/gazebo/issue/744/problems-migrating-plugin-from-gazebo-15

piyushk commented 11 years ago

The issue as reported here has been resolved upstream.