10 #include <argos3/core/wrappers/lua/lua_utility.h>
32 Velocities[0] = f_north_vel;
33 Velocities[1] = f_west_vel;
34 Velocities[2] = f_south_vel;
35 Velocities[3] = f_east_vel;
52 if(&s_velocities !=
this) {
72 int LuaSetVelocity(lua_State* pt_lua_state) {
74 if(lua_gettop(pt_lua_state) != 4) {
75 return luaL_error(pt_lua_state,
"robot.rotors.set_velocity() expects 4 arguments");
77 luaL_checktype(pt_lua_state, 1, LUA_TNUMBER);
78 luaL_checktype(pt_lua_state, 2, LUA_TNUMBER);
79 luaL_checktype(pt_lua_state, 3, LUA_TNUMBER);
80 luaL_checktype(pt_lua_state, 4, LUA_TNUMBER);
82 CLuaUtility::GetDeviceInstance<CCI_MiniQuadrotorRotorActuator>(pt_lua_state,
"rotors")->
84 lua_tonumber(pt_lua_state, 1),
85 lua_tonumber(pt_lua_state, 2),
86 lua_tonumber(pt_lua_state, 3),
87 lua_tonumber(pt_lua_state, 4)));
96 void CCI_MiniQuadrotorRotorActuator::CreateLuaState(lua_State* pt_lua_state) {
float Real
Collects all ARGoS code.
The namespace containing all the ARGoS related code.
static void AddToTable(lua_State *pt_state, const std::string &str_key, void *pt_data)
Adds a pointer to a chunk of data with the given string key to the table located at the top of the st...
static void OpenRobotStateTable(lua_State *pt_state, const std::string &str_key)
Opens a table in the robot state, creating it if it does not exist.
static void CloseRobotStateTable(lua_State *pt_state)
Closes a table in the robot state.
virtual void SetRotorVelocities(const SVelocities &s_velocities)=0
SVelocities & operator=(const SVelocities &s_velocities)