cogimon / cogimon.github.io

COGIMON Top-Level Documentation
GNU Lesser General Public License v3.0
1 stars 4 forks source link

Reset World Feature #17

Open ndehio opened 7 years ago

ndehio commented 7 years ago

I implemented an simple example for demonstrating and testing the "Reset World Feature" in
https://github.com/cogimon/workshop-extended-example/ -> branch resetWorldExample

Could you please check whether this is done in a correct way? I am not sure exactly at which point between configuring, starting, stopping and cleaning of components one should (de-)activate the dynamics via "toggleDynamicsSimulationGazebo()". It seems that sometimes the robot crashes.

EnricoMingo commented 7 years ago

There are 2 basic functions that you should use to do this:

  1. coman.reset_model_config that puts the robot to the initial configuration in joint space
  2. gazebo.reset_model_pose that puts the robot to the initial pose in world frame

For example: if you are testing different walking algorithm you can run the first algorithm, when it finish you can call these 2 methods (the order is not important) and the robot will be placed at the starting point with the initial configuration. Is also not important to stop the dynamics.

In the case there are also object involved then there is another method in gazebo that reset the world completely but you should call just after it the coman.reset_model_config (calling just the first one the world will be reset but the robot will take the last configuration in joint space). Also in this case the order should not be important (you can take the robot to the initial configuration and then reset the world).

2016-11-07 15:48 GMT+01:00 ndehio notifications@github.com:

I implemented an simple example for demonstrating and testing the "Reset World Feature" in https://github.com/cogimon/workshop-extended-example/ -> branch resetWorldExample

Could you please check whether this is done in a correct way? I am not sure exactly at which point between configuring, starting, stopping and cleaning of components one should (de-)activate the dynamics via " toggleDynamicsSimulationGazebo()". It seems that sometimes the robot crashes.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/cogimon/cogimon.github.io/issues/17, or mute the thread https://github.com/notifications/unsubscribe-auth/AFQaypp684NUEc3qxUTzo23AvG5yy17Zks5q7zo0gaJpZM4KrSsv .

PhD Mingo Hoffman Enrico Istituto Italiano di Tecnologia, Genova

OpenSoT commented 7 years ago

This can be closed?

ndehio commented 7 years ago

Actually not... The simple example still does not work. It uses a fixed-base kuka robot arm which is why gazebo.reset_model_pose does not has any effect. Please have a look to the example

EnricoMingo commented 7 years ago

Have you tried to use the operation reset_model_configuration?

2017-02-01 16:42 GMT+01:00 ndehio notifications@github.com:

Actually not... The simple example still does not work. It uses a fixed-base kuka robot arm which is why gazebo.reset_model_pose does not has any effect. Please have a look to the example

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/cogimon/cogimon.github.io/issues/17#issuecomment-276691413, or mute the thread https://github.com/notifications/unsubscribe-auth/AFQaynR8jVFB_GRcJgMohoF6w7jxX9-cks5rYKfsgaJpZM4KrSsv .

-- PhD Mingo Hoffman Enrico Istituto Italiano di Tecnologia, Genova