Posts

Showing posts from January, 2018

CoppeliaSim - Keyboard Input, Status Bar, Console Window, and Nil

Image
According to http://www.forum.coppeliarobotics.com/viewtopic.php?f=9&t=1751 and http://www.forum.coppeliarobotics.com/viewtopic.php?f=9&t=5299 in CoppeliaSim forum, we can know that string.byte('A') represents character 'A' and auxiliaryData[1] stores keyboard input of simGetSimulatorMessage(). The dialog at bottom of CoppeliaSim is called status bar, while console window is hidden by default. By changing user setting, you can see it. Warning: Closing console window leads to shutting down software CoppeliaSim itself. Use simAddStatusbarMessage(auxiliaryData[1]) to print input message on status bar, then use print(auxiliaryData[1]) to print input message on console window. You can check script of object naked car in folder example to know how to deal with keyboard input. For function reference, visit http://www.coppeliarobotics.com/helpFiles/en/apiFunctions.htm#simGetSimulatorMessage . Sometimes functions return value nil which means nothing. It i