NAOsim

What is NAOsim

NAOsim allows you to launch a simulated NAO moving in a virtual world.
It offers a safe place to test behaviors before playing them on a real robot. For further details see: Testing a behavior in NAOsim.

../../_images/NAOsim_red_ball.png

Main functionalities

The virtual environment can by customized by inserting and modifying objects of various shapes.
For further details, see Handling objects in NAOsim.

Choregraphe and Monitor can be connected to this simulated robot.

C++ developer can also use their customized NAOqi with NAOsim in order to test their modules.
For further details, see Using a customized NAOqi.

List of supported sensors and actuators

NAOsim supports the major part of NAO’s sensors and actuators:

  • Motor position (Sensor & Actuator)
  • Inertial board
  • Force Sensitive Resistors (On/Off)
  • Bumpers contact
  • Camera (top and bottom)

Installing NAOsim

Windows

Step Action
Make sure you have logged on as Administrator or as a user with Administrator privileges.

Retrieve the following file: NAOsim-x.x-WIN32.exe

You can find it on the DVD in Software > Software Suite > NAOsim
or download the latest release from the Aldebaran Robotics’ User or Developer site.
Double-click the file to start the installation.
Follow the Wizard steps.

Mac

Step Action
Make sure you have logged on as Administrator or as a user with Administrator privileges.

Make sure you have installed Python 2.7.

  • OS X 10.7.1 (Lion) comes with Python 2.7, but
  • OS X 10.6.4 (Snow Leopard) comes with Python 2.6.

You can find the installer here: http://python.org/download/

Retrieve the following file: NAOsim-x.x-OSX.zip

You can find it on the DVD in Software > Software Suite > NAOsim
or download the latest release from the Aldebaran Robotics’ User or Developer site.
Open the file.
Double-click the file to start the installation.

Activating NAOsim license

By default, NAOsim is installed with a trial evaluation license. Do not wait its expiration to activate your license.

First installation - with Internet connection

To activate the license:

Step Action
Launch NAOsim and choose Help > Activation.

Enter the product serial number.

You can find it inside the DVD.

Click OK button.

First installation - without Internet connection

To activate the license on a computer having no access to Internet:

Step Action

Launch NAOsim Activator executable located on NAOsim installation directory.

../../_images/license_activation.png
Copy the Host ID.
Execute the instructions displayed using another, connected to Internet, computer.
Come back to NAOsim Activator to finish the activation process.

Upgrade

To reactivate your license:

Step Action

Request your new NAOsim license key to Aldebaran Robotics support.

To do so, use the contact form: http://www.aldebaran-robotics.com/en/Support/support-contact.html and provide your Client Code and the serial number of your robot.

Once you have received the new license key, proceeds in the same way as for a first installation.

Getting started

Launching a simulated robot

Step Action
Launch NAOsim.

Create your environment.

  1. Choose File > New menu.
  2. Select Small Apartment.
  3. Click OK button.

Optionally, customize your environment.

For further details see Handling objects in NAOsim.

Add a robot.

  1. Choose View > Robots menu.
  2. Drag & drop the model of the robot you want to simulate.

Optionally, choose an external NAOqi.

For further details see Using a customized NAOqi.

Choose Run > Start or click the play-button Start button to turn on the simulation (it will launch NAOqi).

Connecting Choregraphe to the simulated robot

Step Action
Launch Choregraphe.
Choose Connection > Connect to or click the connect-button Connect to button.

Select your simulated robot (the name should include the name of your computer).

Its icon should be:

../../_images/beginning_nao_bleu.png

In Choregraphe, you can now:

  • control the virtual robot with the Robot view panel and
  • check what the virtual robot is seeing in the Video monitor panel.
../../_images/NAOsim_and_Choregraphe.png

Testing a behavior in NAOsim

Step Action

Make sure you have launched a simulated robot and have connected Choregraphe to it.

For further details see Launching a simulated robot and Connecting Choregraphe to the simulated robot.

In Choregraphe, create a behavior.
Click the Play button.
Check the result in NAOsim.
Adapt your behavior and play it again.
../../_images/NAOsim_WB2.png ../../_images/NAOsim_track_red_ball.png

Handling objects in NAOsim

Step Action
Choose View > Objects to add the Objects panel.

Add an object in your virtual environment:

  1. Select an object in the Objects panel.
  2. In the virtual environment, click where you want the object to be added.

Edit an object:

  1. Open the Hierarchy View and the Properties panels.
  2. Select the object in the Hierarchy View.
  3. In the toolbar, click the Move, Rotate or Scale icon.
../../_images/navigation_buttons.png
  1. In the virtual environment, move the cursor on the X, Y or Z axis to edit the object.
../../_images/move_object.png
  1. You can also modify the Position, the physics parameters and the Material of the object.
../../_images/transform_properties.png

Delete an object:

  1. Select an object either in the Hierarchy View panel or in the virtual environment.
  2. Press the Del key.

Using a customized NAOqi

By default, NAOsim uses an embedded copy of NAOqi to simulate the robot. C++ developers can also connect NAOsim to their customized NAOqi in order to test their own modules.

For further details, see C++ SDK.

To use your own NAOqi:

Step Action
Choose File > Preferences > NAO and browse to select the path of your NAOqi.
Check the presence of the files bin/naoqi-bin and bin/nao_simulation_hal.
Uncomment the dcm_hal line in naoqi-sdk/etc/naoqi/autoload.ini.

Troubleshooting

Activation troubles

After entering the activation key, in the case of the following error “Bad return data from web server” or “1103 error”

  1. Ensure that your Internet connection works fine and that you are connected through Ethernet.
  2. Check if you have used the correct license format: 1111-1111-1111-1111
  3. If you have Vmwareplayer 4.0, try to uninstall it if you can and enter the key again.
  4. If you still have an error, we recommend to disable everything that could block the communication with the license server. Do not use proxies, and disable your firewall or / and antivirus.
  5. If any of the solutions above didn’t work, please try the manual activation.

NAOsim crashes

If NAOsim crashes systematically, make sure the installation path of NAOsim contains only ASCII characters.

I can’t see my virtual NAO in the connection window of Choregraphe

Make sure you clicked on the Start button in NAOsim to turn on your virtual robot.

Two NAOs have the same name in the connection window of Choregraphe

Select the one with the port 9559.

The NAO doesn’t move with Choregraphe

If the robot doesn’t move in NAOsim when you launch standard boxes of Choregraphe.

  1. Ensure that you are connected to the simulated robot (You should see the simulated environment in Choregraphe’s Video monitor panel).
  2. Ensure that you’ve activated the stiffness (if the button is activated) on Choregraphe.
  3. Restore the default settings of NAOsim (File > Preferences > NAO > Restore Defaults).
  4. Restart Choregraphe and NAOsim.

My NAOsim window is grey, I can’t see NAO or any objects

Example of the issue:

../../_images/naosim_bugzoom.png

You probably zoomed in or out too much (the issue can occur also if you zoomed outside NAOsim due to a bug).

  1. Display the Explorer: choose View > Hierarchy View.
  2. Select an item in the list.
  3. Press the F key.

The window focus is now on the item selected and the issue is fixed.

Annoying warning

When connecting Choregraphe and NAOsim, there can be the warning: NAOqi’s version seems to differ from the Choregraphe you are using.

  1. In NAOsim, choose File > Preferences > NAO and browse to select another naoqi-sdk path (C++ SDK).
  2. Check the presence of the files bin/naoqi-bin and bin/nao_simulation_hal.
  3. Uncomment the dcm_hal line in naoqi-sdk/etc/naoqi/autoload.ini.
  4. Restart the simulation: in NAOsim click Stop and Start.
  5. Reset the connection in Choregraphe.