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.
Add a new type of obstacle in the project bar (support search models, search woodenBox in the search window in the upper right corner)
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
2 Add robot model
Add a new robot model (e-puck) via search mode
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.
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
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