Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reset robot position and odometry #12

Open
mbegnini opened this issue Nov 27, 2014 · 4 comments
Open

reset robot position and odometry #12

mbegnini opened this issue Nov 27, 2014 · 4 comments

Comments

@mbegnini
Copy link

Hi,

After a simulation, i need to close MobileSim and open again to do the next simulation, because File->Reset Positions do not reset odometry to 0 0 0. I tried to use arrobot_comand(225) and arrobot_comand(7), but did nothing. Any solution?

Thanks!

@reed-adept
Copy link
Owner

You can use arrobot_resetpos() to reset the odometry. This resets odometry in MobileSim but also resets the pose stored by ARIA using ArRobot::moveTo(0,0,0);

There is also a command to move the simulated real position (true pose) in the simulator, see http://robots.mobilerobots.com/wiki/Command_To_Relocate_(Move)_Robot_In_MobileSim, but there isn't yet a suitable function in the Matlab interface for sending longer/unusual commands like that. You could add an "arrobot_move_sim_pose(x, y, t)" or similar function to the ariac library and to the Matlab mex functions, or I can add it to our todo list for a future version.

Reed

From: maubegnini <notifications@github.commailto:notifications@github.com>
Reply-To: reed-adept/aria-matlab <reply@reply.github.commailto:reply@reply.github.com>
Date: Thu, 27 Nov 2014 08:39:31 -0800
To: reed-adept/aria-matlab <aria-matlab@noreply.github.commailto:aria-matlab@noreply.github.com>
Subject: [aria-matlab] reset robot position and odometry (#12)

Hi,

After a simulation, i need to close MobileSim and open again to do the next simulation, because File->Reset Positions do not reset odometry to 0 0 0. I tried to use arrobot_comand(224) and arrobot_comand(7), but did nothing. Any solution?

Thanks!


Reply to this email directly or view it on GitHubhttps://github.com//issues/12.

@mbegnini
Copy link
Author

mbegnini commented Dec 1, 2014

Thanks for the help Reed.

To solve the problem i rewrite arrobot_resetpos, changing the comand
robot->com(ArCommands::SETO);
robot->moveTo(ArPose(0, 0, 0), p);
to
robot->com(ArCommands::SIM_RESET);
robot->moveTo(ArPose(0, 0, 0), p);
Now it reset the odometry and the real position.

I also tryied to relpace the moveTo for the relocate code, but it didn`t
change the true position of the robot.

2014-11-29 10:01 GMT-02:00 Reed Hedges notifications@github.com:

You can use arrobot_resetpos() to reset the odometry. This resets odometry
in MobileSim but also resets the pose stored by ARIA using
ArRobot::moveTo(0,0,0);

There is also a command to move the simulated real position (true pose) in
the simulator, see
http://robots.mobilerobots.com/wiki/Command_To_Relocate_(Move)_Robot_In_MobileSim,
but there isn't yet a suitable function in the Matlab interface for sending
longer/unusual commands like that. You could add an
"arrobot_move_sim_pose(x, y, t)" or similar function to the ariac library
and to the Matlab mex functions, or I can add it to our todo list for a
future version.

Reed

From: maubegnini <notifications@github.commailto:notifications@github.com>

Reply-To: reed-adept/aria-matlab <reply@reply.github.com<mailto:
reply@reply.github.com>>
Date: Thu, 27 Nov 2014 08:39:31 -0800
To: reed-adept/aria-matlab <aria-matlab@noreply.github.com<mailto:
aria-matlab@noreply.github.com>>
Subject: [aria-matlab] reset robot position and odometry (#12)

Hi,

After a simulation, i need to close MobileSim and open again to do the
next simulation, because File->Reset Positions do not reset odometry to 0 0
0. I tried to use arrobot_comand(224) and arrobot_comand(7), but did
nothing. Any solution?

Thanks!


Reply to this email directly or view it on GitHub<
https://github.com/reed-adept/aria-matlab/issues/12>.


Reply to this email directly or view it on GitHub
#12 (comment)
.

Mauricio Begnini

@reed-adept
Copy link
Owner

OK, glad you found a solution. If you want to rename it to a new name, you can do so in libariac, then make a new file with the new function in mex-src, then add it to the list of mex functions in makemex.m.

There is a difference between the robot odometric position provided by either MobileSim or a real robot, the position stored by ARIA (which is related to the robot odometric pose via a transform which is set by the moveTo() function), and a “true” position of the robot which is only represented in MobileSim. Moving the true pose with SIM_RESET or the command I sent earlier is like picking up the real robot and carrying it to a new place. So you need to change the odometry, the true position, and ARIA’s transformed position. SIM_RESET changes the first two to 0,0,0, and moveTo() changes the last.

From: maubegnini [mailto:notifications@github.com]
Sent: Monday, December 01, 2014 10:23 AM
To: reed-adept/aria-matlab
Cc: Reed Hedges
Subject: Re: [aria-matlab] reset robot position and odometry (#12)

Thanks for the help Reed.

To solve the problem i rewrite arrobot_resetpos, changing the comand
robot->com(ArCommands::SETO);
robot->moveTo(ArPose(0, 0, 0), p);
to
robot->com(ArCommands::SIM_RESET);
robot->moveTo(ArPose(0, 0, 0), p);
Now it reset the odometry and the real position.

I also tryied to relpace the moveTo for the relocate code, but it didn`t
change the true position of the robot.

2014-11-29 10:01 GMT-02:00 Reed Hedges notifications@github.com:

You can use arrobot_resetpos() to reset the odometry. This resets odometry
in MobileSim but also resets the pose stored by ARIA using
ArRobot::moveTo(0,0,0);

There is also a command to move the simulated real position (true pose) in
the simulator, see
http://robots.mobilerobots.com/wiki/Command_To_Relocate_(Move)_Robot_In_MobileSim,
but there isn't yet a suitable function in the Matlab interface for sending
longer/unusual commands like that. You could add an
"arrobot_move_sim_pose(x, y, t)" or similar function to the ariac library
and to the Matlab mex functions, or I can add it to our todo list for a
future version.

Reed

From: maubegnini <notifications@github.commailto:notifications@github.com>

Reply-To: reed-adept/aria-matlab <reply@reply.github.com<mailto:
reply@reply.github.com>>
Date: Thu, 27 Nov 2014 08:39:31 -0800
To: reed-adept/aria-matlab <aria-matlab@noreply.github.com<mailto:
aria-matlab@noreply.github.com>>
Subject: [aria-matlab] reset robot position and odometry (#12)

Hi,

After a simulation, i need to close MobileSim and open again to do the
next simulation, because File->Reset Positions do not reset odometry to 0 0
0. I tried to use arrobot_comand(224) and arrobot_comand(7), but did
nothing. Any solution?

Thanks!


Reply to this email directly or view it on GitHub<
https://github.com/reed-adept/aria-matlab/issues/12>.


Reply to this email directly or view it on GitHub
#12 (comment)
.

Mauricio Begnini


Reply to this email directly or view it on GitHubhttps://github.com//issues/12#issuecomment-65079607.

@mbegnini
Copy link
Author

mbegnini commented Dec 1, 2014

Thanks for the clarification about the diferent positions Reed. Now I`m
having troubles with the robot orientation, It apears that theta is
discontinuous. Is there an ARIA configuration so I can use an incremental
approach?

2014-12-01 14:36 GMT-02:00 Reed Hedges notifications@github.com:

OK, glad you found a solution. If you want to rename it to a new name, you
can do so in libariac, then make a new file with the new function in
mex-src, then add it to the list of mex functions in makemex.m.

There is a difference between the robot odometric position provided by
either MobileSim or a real robot, the position stored by ARIA (which is
related to the robot odometric pose via a transform which is set by the
moveTo() function), and a “true” position of the robot which is only
represented in MobileSim. Moving the true pose with SIM_RESET or the
command I sent earlier is like picking up the real robot and carrying it to
a new place. So you need to change the odometry, the true position, and
ARIA’s transformed position. SIM_RESET changes the first two to 0,0,0, and
moveTo() changes the last.

From: maubegnini [mailto:notifications@github.com]
Sent: Monday, December 01, 2014 10:23 AM
To: reed-adept/aria-matlab
Cc: Reed Hedges
Subject: Re: [aria-matlab] reset robot position and odometry (#12)

Thanks for the help Reed.

To solve the problem i rewrite arrobot_resetpos, changing the comand
robot->com(ArCommands::SETO);
robot->moveTo(ArPose(0, 0, 0), p);
to
robot->com(ArCommands::SIM_RESET);
robot->moveTo(ArPose(0, 0, 0), p);
Now it reset the odometry and the real position.

I also tryied to relpace the moveTo for the relocate code, but it didn`t
change the true position of the robot.

2014-11-29 10:01 GMT-02:00 Reed Hedges notifications@github.com:

You can use arrobot_resetpos() to reset the odometry. This resets
odometry
in MobileSim but also resets the pose stored by ARIA using
ArRobot::moveTo(0,0,0);

There is also a command to move the simulated real position (true pose)
in
the simulator, see

http://robots.mobilerobots.com/wiki/Command_To_Relocate_(Move)_Robot_In_MobileSim,

but there isn't yet a suitable function in the Matlab interface for
sending
longer/unusual commands like that. You could add an
"arrobot_move_sim_pose(x, y, t)" or similar function to the ariac
library
and to the Matlab mex functions, or I can add it to our todo list for a
future version.

Reed

From: maubegnini <notifications@github.com<mailto:
notifications@github.com>>

Reply-To: reed-adept/aria-matlab <reply@reply.github.com<mailto:
reply@reply.github.com>>
Date: Thu, 27 Nov 2014 08:39:31 -0800
To: reed-adept/aria-matlab <aria-matlab@noreply.github.com<mailto:
aria-matlab@noreply.github.com>>
Subject: [aria-matlab] reset robot position and odometry (#12)

Hi,

After a simulation, i need to close MobileSim and open again to do the
next simulation, because File->Reset Positions do not reset odometry to
0 0
0. I tried to use arrobot_comand(224) and arrobot_comand(7), but did
nothing. Any solution?

Thanks!


Reply to this email directly or view it on GitHub<
https://github.com/reed-adept/aria-matlab/issues/12>.


Reply to this email directly or view it on GitHub
<
https://github.com/reed-adept/aria-matlab/issues/12#issuecomment-64949641>

.

Mauricio Begnini


Reply to this email directly or view it on GitHub<
https://github.com/reed-adept/aria-matlab/issues/12#issuecomment-65079607>.


Reply to this email directly or view it on GitHub
#12 (comment)
.

Mauricio Begnini

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants