Webots robot simulation platform (3) new environment model

This blog introduces how to create a new world in webot and add obstacles, robots and other elements to the environment, and add the controller corresponding to the robot. This can help us to place multiple obstacles and robot models on the existing environment files, and modify the existing environment models.

1 Create a new world model

Wizards->New Project Directory menu bar to create a new project and save it.
Insert picture description here
Add a new type of obstacle in the project bar (support search models, search woodenBox in the search window in the upper right corner)
Insert picture description here
with the mouse to select the obstacle in the map, three colored arrows will appear, click the middle arrow with the mouse to achieve When dragging obstacles, you can also set the size, position, quality and other parameters of obstacles through the property bar on the left
Insert picture description here

2 Add robot model

Add a new robot model (e-puck) via search mode
Insert picture description here
Insert picture description here

3 Add robot controller

Create a new robot controller in the Wizards->New Robot Controller menu bar and save it as my_controller . Here, C, C++, JAVA, MATLAB languages ​​are supported for new creation. At this time, the programming interface of the robot controller will appear in the right column.
Insert picture description here
Here, to demonstrate the function, I directly copied the content of the original e-puck controller. After we have finished writing the controller, we need to specify the robot to use our newly created controller, as shown in the figure below, this time select our own The following method of using the newly created ( my_controller ) is the
Insert picture description here
same as the built-in model. We will add knowledge about the syntax of the controller later.

Reference

https://www.cyberbotics.com/doc/reference/motion

If you think the article is helpful to you, please give me a like. O(∩_∩)O

Welcome everyone to exchange and discuss in the comment area ([email protected])

Previous: Webot Robot Simulation Platform (2) Communication with ROS Next: Webot Robot Simulation Platform (4) Robot Basic Controller

Guess you like

Origin blog.csdn.net/crp997576280/article/details/105341656