0
$\begingroup$

Gazebo Answers logo

Hi everyone,

First of all I'm not sure if its correct to comment a still not accepted PR, so I'm just leaving this here. This is about Port time commands (pause / reset) PR.

I want to be able to reset my robot, but I'm not achieving the desired results with neither /reset_world nor /reset_simulation. Images are self explanatory, only the pure gazebo model works as expected, not the urdf.

  • In reset_world MARA model is not affected.
  • In reset_simulation MARA loses all joint forces, or something like that.

reset_world

reset_world

reset_simulation

reset_simulation


Originally posted by nzlz on Gazebo Answers with karma: 90 on 2019-01-03

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Gazebo Answers logo

Thank you for trying out that pull request!

Images are self explanatory

Actually, could you describe what are the expected outcomes? You say that "In reset_simulation MARA loses all joint forces", and that's what I would expect. I'm not sure how you're applying forces to the model, but on your plugin, you should override the Plugin::Reset method and make sure your controllers respond accordingly. Another way to check if a reset occurred is to get the current simulation time and detect if it has moved backwards.


Also, a side note, the ROS 2 pull request you're testing is only exposing Gazebo functionality which you could also access through the GUI. These are the hotkeys on gzclient:

  • Ctrl + R: Reset simulation
  • Ctrl + Shift + R: Reset world

Originally posted by chapulina with karma: 7504 on 2019-01-03

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by nzlz on 2019-01-04:
The plugin I'm using is probably the failing part. But I really don't know how to proceed or what could be failing. (Reset is not implemented.) I would really appreciate if you can give me some hints : https://github.com/AcutronicRobotics/MARA/blob/master/mara_gazebo_plugins/src/mara_gazebo_joint_plugin.cpp

I have to mention I've seen (2 times only) the robot recover by itself after a long time, and start moving normal again. Really don't know why or how this happened.

Comment by nzlz on 2019-01-04:
I want to mention also that I don't get any console error. The last message is: [INFO] [mara_joint_state]: Negative sim time difference detected.

Comment by chapulina on 2019-01-04:
On your plugin, I'd check if joints_[MARAGazeboPluginRosPrivate::AXIS1]->SetPosition(0, goal_position_axis1_rad, false); is still being called after reset. seconds_since_last_update is probably negative.

Comment by nzlz on 2019-01-07:
Thanks!! Removing negative time check + Adding initialization variables to Reset() fixed the issue. reset_simulation is working as expected now.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.