Week5

上課內容:

bubbleRob V-rep 模擬。

1.Add a primitive sphere of diameter 0.2 to the scene with [Menu bar --> Add --> Primitive shape --> Sphere].

2.Rename to it BubbleRob.

3.Adjust the X-size item to 0.2.

4.Enabled Body is respondable and Body is dynamic .

5.Enable Collidable, Measurable, Renderable and Detectable in the object common properties for that shape.

6.And enter 0.02 for Along Z. We make sure that theRelative to-item is set to World. Then we click Translate selection.

7.Add a proximity sensor [Menu bar --> Add --> Proximity sensor --> Cone type].

8.Rename to it bubbleRob_sensingNose.

9.On the orientation tab, we enter 90 for Around Y and for Around Z, then click Rotate selection.

10.In the position dialog, on the positiontab, we enter 0.1 for X-coord. and 0.12 for Z-coord.

  1. Click Show volume parameter adjust items Offset to 0.005, Angle to 30 and Range to 0.15.

  1. Click Show detection parameters uncheck item Don't allow detections if distance smaller than.

13.Add a pure primitive cylinder with dimensions,size(0.08,0.08,0.02).

14.Rename it to bubbleRob_leftWheel.

15.Set the cylinder's absolute position to (0.05,0.1,0.04).

  1. Set absolute orientation to (-90,0,0).

17.Copy and paste the wheel, and set the absolute Y coordinate of the copy to -0.1.

18.Rename it to bubbleRob_rightWheel.

19.Add joints (or motors) for the wheels. Click [Menu bar --> Add --> Joint --> Revolute].

20.Rename it to bubbleRob_rightMotor.

21.On the position tab, click the Apply to selection button.

22.On the orientation tab, click the Apply to selection button.

23.We do the same to bubbleRob_leftMotor.

24.Attach the bubbleRob_sensingNose to the BubbleRob.

25.Attach the left wheel to the left motor ,and attach motor to BubbleRob.

26.Attach the right wheel to the right motor ,and attach motor to BubbleRob.

27.Click Show dynamic parameters to open the joint dynamics properties dialog. We enable the motor, and check item Lock motor when target velocity is zero.

28.Add a pure primitive sphere with diameter 0.05 and make the sphere Collidable, Measurable, Renderable and Detectable. set absolute position to(-0.07,0,0).

29.Add a force sensor object with [Menu bar --> Add --> Force sensor]. set absolute position to(-0.07,0,0.25).

30.Attach the slider to the force sensor.

31.BubbleRob set the local respondable mask to 11110000.

32.BubbleRob_slider set the local respondable mask to 00001111.

33.Select the two wheels and the slider, and in the shape dynamics dialog we click three times M=M*2 (for selection).

34.Enabled Collidable, Measurable, Renderable and Detectable.