Webots Environment CAD
Based on Thursday's meeting with Daniel, I built the following environment modules:
(Note: all modules can be scaled and rotated in Webots.)
1. Base: The base is the ground. Other modules will be laid on top of this base modules. I decide to use this base in case we want to scale the other modules (the resized modules may have different sizes and can not be puzzled together). The dimension for this base module is 2.5m x 2.5m.
2. Bump: the dimension is 1.25m x 1.25m.
3. Mountain: the dimension is 1.25m x 1.25m.
4. Slope: the dimension is 1.25m x 1.25m. If we import this slope, we can not change the incline angle in Webots since it is a solid piece.
5. Ditch: I call this a Volcano Ditch. The dimension is 1.25m x 1.25m.
CAD Environment in Webots
1. Add base
2. Add bump on top of base
3. Move bump
4. Rotate bump
5. All 4 modules
Simulation (with hard coded target location, for now)
1. Climb slope
2. Across bump
3. Across mountain
4. Across regular ditch
5. Across small ditch, ditch is scaled down. (the base can be seen beneath the small ditch, that's why i chose to use base, otherwise, it will be empty and robot will fall)
Challenges:
Well, there is a problem: I received this error "WARNING: The current physics step could not be computed correctly. Your world may be too complex. If this problem persists, try simplifying your bounding object(s), reducing the number of joints, or reducing WorldInfo.basicTimeStep." Whenever this error shows up during simulation, the robot goes crazy. I tried to adjust WorldInfo.basicTimeStep but it did not work
- 1st potential reason: the base. To build the environment, the 4 modules are on top of the base (with overlays). Overlay may caused the problem. Well, deleting the base did not solve the problem
- 2nd potential reason: too many individual solid (plus bounding object). Using only 1 environment module (e.g. the ditch in the video below), the error was gone.
By combining all 4 modules into 1 environment and imported into Webots as 1 solid, robot moves without warning. Here are 4 examples
A question: Can Scenic take multiple modules, assemble them, and export into 1 solid so that Webots can use without giving errors?
If so, we will not need the base module and only combine the other 4 in the way we want in Scenic.
For now, let's use the externally-combined 4-module environment (shown below) to move forward to editing controller.
Moving on to get target location read instead of hard coded.
A Webots Supervisor API tutorial