-- シミュレーションの設定ファイル
-- Satofumi KAMIMURA
-- $Id: simulation_settings.lua 1367 2009-10-03 10:00:29Z satofumi $


-- 利用デバイスの初期化
DeviceManager():createDevice("/dev/usb/ttyUSB0", "BeegoDrive", "run")
DeviceManager():createDevice("/dev/ttyACM0", "UrgDevice", "urg")


-- デバイスを作成
DeviceManager():device("run"):activate()
DeviceManager():device("urg"):activate()


-- デバイス位置を設定
local run = DeviceManager():model("run")
run:setPosition(Position(0, 0, deg(0)), nil, false)

local urg = DeviceManager():model("urg")
urg:setPosition3d(Point3d(70, 0, 100), 0.0, 0.0, 1.0, deg(0), run, true)


-- カメラ視点を設定
CameraViewManager():setInitialView(2.0, 0.0, 6.0, deg(0), deg(0), deg(0))


-- 障害物を配置

-- 箱
local box = Box(300, 300, 300, 1.0)
box:setPosition(Position(1000, 0, deg(0)), nil, false)

local box = Box(300, 2000, 300, 1.0)
box:setPosition(Position(2000, 1500, deg(0)), nil, false)

local box = Box(300, 2000, 300, 1.0)
box:setPosition(Position(3000, -800, deg(0)), nil, false)

-- 円柱
local cylinder = Cylinder(50, 300, 1.0)
cylinder:setPosition(Position(1000, -500, deg(0)), nil, false)

local cylinder = Cylinder(50, 300, 1.0)
cylinder:setPosition(Position(500, -900, deg(0)), nil, false)
