Ask Your Question
0

resetting pose in odom

asked 2017-04-22 06:49:11 -0600

rsmitha gravatar image

updated 2017-04-22 16:37:50 -0600

Hi,

I am running a simulation with jackal. I am performing some tests where I ask the jackal to run a certain distance, stop and return to (0,0). When I try to set the pose of the jackal in the odometry frame to (0,0), using /set_pose, the pose does not get reset. For example, after the robot moves for a distance of 10m, the position is (10.503, -0.0001). I want to have the robot's odometry position to be (0,0) and starting counting is position again from (0,0).

In other words, I want to be able to erase the sensor data from the odometry source in ROS for each run, so that for every run it can start as it does at startup. Is that possible through some parameters?

Please help. Regards, rsmitha.

edit retag flag offensive close merge delete

Comments

Suggestion: You could set the target pose in robots base frame instead odom, that is always relative to current position.

Humpelstilzchen gravatar imageHumpelstilzchen ( 2017-04-24 06:36:56 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-04-27 18:40:55 -0600

rsmitha gravatar image

Hi,

Just to close the issue and inform others of the methods, if anyone else has the same requirements and are looking for answers:

I managed to reset the simulation, odom frame and the "ground-truth" (in this case, gazebo world frame) and get the odometry to forget its collected data and start from (0,0) for every iteration of the runs, by writing a bash script to cycle through the runs. The bash script restarts the simulation in a separate terminal and launches the application using rosrun in another terminal.

The gazebo topics such as "gazebo/reset_simulation" and "gazebo/reset_world" only seem to reset the pose of the robot in simulation. The word "reset" in these topics seems to be misleading because the rest of the factors/parameters such as odometry/sensor states do not get re-initialised with reset. In order to reset practically everything, ROS has to be stopped and restarted and there is no clean way to do this from within the application. The bash script seems to be the cleaner approach. Apart from this, there are methods where the launch files can be written to do the stop and start. However, if tests where multiple runs are being performed are being executed, the launch files would still need to be controlled from bash scripts or another application. Hope this helps !! Regards, rsmitha.

edit flag offensive delete link more

Comments

Cant accept my own answer :)

rsmitha gravatar imagersmitha ( 2017-04-27 18:41:47 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2017-04-22 06:49:11 -0600

Seen: 753 times

Last updated: Apr 27 '17