Robotics StackExchange | Archived questions

Physics Glitching, Velocity NaN

I am running a ROS-based simulation involving a quadcopter from the hector_quadrotor packages. While driving the quadcopter manually, it is fairly easy to crash the quadcopter in such a way that the physics glitches and causes the model to reposition itself at the origin (usually) and refuse to accept further input other than rotation on the spot. It often drifts randomly at this time as well.

After the problem has occurred, calling the /gazebo/getmodelstate ROS service reveals that the linear and angular velocities of the quadcopter are NaN:

$ rosservice call /gazebo/get_model_state "model_name: 'quadrotor' \
relative_entity_name: ''" 
pose: 
  position: 
    x: 0.0
    y: 0.0
    z: 0.0
  orientation: 
    x: 0.0
    y: 0.0
    z: 0.0
    w: 1.0
twist: 
  linear: 
    x: nan
    y: nan
    z: nan
  angular: 
    x: nan
    y: nan
    z: nan
success: True
status_message: GetModelState: got properties

I am using a fully-updated ROS Hydro install on Ubuntu 14.04 with Gazebo v2.2.3.

The ideal solution would be to prevent crashes causing the models to glitch out at all, however if there was a way to reset a model to fix the problem without requiring Gazebo to be relaunched it would work for me.

Thank you for your help and please let me know if there's any other information that might be helpful.

Asked by jake.anq on 2015-07-28 07:25:01 UTC

Comments

Answers

Got the same problem here. @jake.anq did you manage to solve this issue? I'm using ROS Kinetic on Ubuntu 16.04 and Gazebo 7.16.0

Asked by caioaamaral on 2020-08-03 20:12:12 UTC

Comments