-- シミュレーションの設定ファイル
-- Satofumi KAMIMURA
-- $Id: simulation_settings.lua 1690 2010-02-13 02:07:59Z satofumi $


-- 利用デバイスの初期化
DeviceManager():createDevice("/dev/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, 1.0, 0.0, deg(-30), run, true)


-- カメラ視点を設定
CameraViewManager():setInitialView(0.0, 0.0, 3.0, deg(0), deg(0), deg(0))
--CameraViewManager():setInitialView(0.0, 1.0, 2.0, deg(-45), deg(0), deg(0))
--CameraViewManager():setScale(2.0)


-- 障害物を配置
local box = Box(5000, 100, 300, 1.0)
box:setPosition(Position(1500, -1000, deg(0)), nil, false)

local cylinder = Cylinder(100, 300, 1.0)
cylinder:setPosition(Position(0, 1000, deg(0)), nil, false)

local cylinder = Cylinder(100, 300, 1.0)
cylinder:setPosition(Position(500, 1000, deg(0)), nil, false)

local cylinder = Cylinder(100, 300, 1.0)
cylinder:setPosition(Position(1000, 1000, deg(0)), nil, false)
