Home | Tutorials | Wiki | Issues
Ask Your Question
0

Unable to reset player position by setting playMode to BeforeKickOff via monitor message in robocup3ds

asked 2018-08-05 23:22:16 -0600

hhnavid gravatar image

Hi, I want to control a simulated Nao in Gazebo using robocup3ds plugin. I need the ability to reset ball position and Nao position whenever I set the game play mode to Before-Kickoff. My code already works with rcssserver3d and simspark. Now I need to adapt my code to robocup3ds plugin. But in robocup3ds, setting play mode to Before-Kickoff just resets the ball position. Nao position is sometimes reset as expected, but sometimes it is not. For example suppose Nao initial position is (0, 0, 0). Assume Nao is at position (-2, 3, 0) and fallen on the ground. Now setting play mode to Before-Kickoff resets Nao position to a point near its last position (e.g. (-2.1, 3.2, 0)). But the desired behavior is to reset Nao to its initial position which is (0, 0, 0).

I have spent several days to figure out what's wrong. But I failed to do so. Does anyone know what might cause such a behavior?

Thanks in advance.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-12-14 23:10:56 -0600

hhnavid gravatar image

Hi, Thanks to the useful hints by Patrick McAlpine, I was able to reset Nao position correctly. I couldn't do it using beam command :

(beam x y rot).

But as Patrick pointed out, I managed to use move command instead:

(agent (unum num) (team team) (pos x y z) (move x y z rot) (battery batterylevel) (temperature temperature) )

This is a workaround for my problem but it yields the result I need.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2018-08-05 23:22:16 -0600

Seen: 571 times

Last updated: 2 days ago