Questions tagged [webots]
Webots is an open-source development environment used to model, program and simulate mobile robots.
259
questions
-2
votes
0
answers
56
views
C++ Webots. Robots not moving to target location [closed]
so I am currently stuck on the movement of my scout robots. The scout robots are similar to epucks, they have 2 motors, distanceSensor and camera. LeaderRobot has 4 motors and a 2D LiDar. Both of ...
0
votes
0
answers
10
views
Getting fields of proto in toolslot
I have a Webots world and proto, where my proto (SoftGripperLars) is attached in the tool slot of the UR3e robot. The SoftGripperLars proto has translation fields for the gripper fingers, and I am ...
-1
votes
0
answers
6
views
PROTO nodes (Current Project) does not exist instead there is a PROTO nodes (Current world)
I'm new to webots. I was following the youtube guidline but when i try to add a PROTO, I can't see this section "PROTO nodes (Current Project)" after clicking on "+".
I I tried to ...
0
votes
0
answers
35
views
How to get drone to hover in Webots
I am trying to get a Crazyflie drone to hover in Webots. I have written the code but when I change the velocity, no matter what I change the velocity to, it stays in the same place on the ground with ...
1
vote
0
answers
17
views
Unable to Specify Robot Name and Modify Port for Extern Controllers in Webots R2023b on Windows 10
I am working in a world setup where I have a robot node (Abot) and a supervisor node (robot) in Webots R2023b on a Windows 10 system. According to the user guidelines, I am trying to control these two ...
0
votes
0
answers
26
views
Pioneer3-DX Robot Simulation: Unexpected Behavior When Combining Turn and Move Functions
I'm working on simulating a Pioneer3-DX robot's movement in a Webots environment using Python. When I call the turn_to_angle and move_distance functions separately, the robot behaves as expected. ...
0
votes
0
answers
56
views
Error: wb_motor_set_velocity() called with negative 'velocity' argument in position control mode (2.38406e-05)
I just tried to reset simulation, but pycharm reported this error to me. I did not set anything about the position. I just used a negative speed value on the motor, but there was no problem before ...
0
votes
0
answers
16
views
Reinforcement learning dqn algorithm does not forge to target value
I am working on a study project with stable baselines3 and webots. I let a vehicle drive in a simple round course. The vehicle has sensors like a camera, distance sensor, the current speed and the ...
1
vote
0
answers
28
views
Webots simultaneous movement of axis
I'm using Webots to simulate the movements of a Kuka robot with 6 axes, but in my example I only have 3. My Webots controller receives the positions every 4 ms.
My problem is that using axis....
0
votes
0
answers
53
views
Make the robot rotate a given angle in Webots
I am working on an implementation 'make the robot turn left for 45 degree' in webots with Python. My main thought is that let the robot keep spinning until the current rotation is 45 degree. This is ...
1
vote
0
answers
84
views
How can I save an image captured by my robot's camera in webots?
I have the below function to get the camera image and return the RGB values for color detection as part of my project.
However, I see that the image is also obtained. I would like to save this image ...
0
votes
1
answer
96
views
Cannot compile .cpp file externally for Webots with Makefile
I'm trying to build a C++ program for Webots.
So first, I just pressed File -> New -> New Robot Controller menu and made everything default except the language, which I chose C++.
Then, Webots ...
0
votes
0
answers
22
views
How to create proto robots in webots
I am now building the bot using the interface that comes with webots, the bot is functional for my needs, but I need this bot to be displayed on the webots-view and he will load very slowly, <3 ...
0
votes
0
answers
16
views
Why is the force on each of my robot's four legs different?
Why is the force on each of my robot's four legs different? (The robot has a mass of 500g, each leg has no mass, and the pad at the end of the leg is 10g.) I believe that theoretically, the force on ...
-1
votes
1
answer
86
views
How do i convert speed vector into Rall-Pitch-Yaw form to create transform?
In Webots sim i have GPS (https://cyberbotics.com/doc/reference/gps?tab-language=ros) measurements
with 2 topics: coords as Point and speed_vector as Vector3 (returns the current GPS speed vector in ...
3
votes
0
answers
52
views
Why a radar sensor in Webots cant detect more than one target?
So i have the following code in a Python controller inside Webots simulator.
from vehicle import Driver
from controller import Radar
radar = Radar("radar")
radar.enable(1)
while driver....
0
votes
0
answers
66
views
Webots E-Puck localization VERY incaccurate (python)
I need to make a robot which follows a line, then heads off the line when close to the goal and then rejoins the line. but the localization program which has been provided has proven itself to be ...
0
votes
1
answer
42
views
How to use a for loop to move through a range of values and save each iteration as a csv file
I am trying to actuate a robotic arm with a finger gripper using Webots by Cyberbotics.
I want the forces, in the forcelist, to be consecutively tested in the for loop. For example, I want the first ...
0
votes
0
answers
27
views
How do I get this for loop to use a different force each time and export each iteration to different csv file?
I am trying to model a robotic arm in simulation software Webots. I want to use a for loop to incrementally increase the force applied to the gripper fingers ('finger_motor') across a range of force ...
0
votes
0
answers
20
views
How can i return to the 'forward' state after the robot detects the line?
i need to write a program, in the program WeBots, for a robot, e-puck, that is following a line, but when it comes to an obstacle it needs to move around it untill the line is back under the robot so ...
0
votes
0
answers
39
views
What can I do if my webots simulation doesn't run?
If I run my simulation and the code has an error, it doesn't work. I have to solve the code issue, close webots and open it again. Is there a way to fix it? Is this a problem with the world or the ...
1
vote
1
answer
90
views
PROTO nodes (Current Project) does not exist
I am currently trying to add a PROTO that is in my project file to an existing world. However, when I try to add a new node, it does not display the "PROTO nodes (Current Project)" section. ...
0
votes
1
answer
96
views
How to add a speaker to webots project (in C)?
I want to use wb_speaker_speak(WbDeviceTag tag, const char *text, double volume) in my webots project (in C). Here is my try (for simplicity I've avoid main and other related functions):
1 #include &...
0
votes
1
answer
54
views
Accepting multiple data packets on a single receiver in WeBots
I am trying to program a receiver module on the e-puck robot to receive data packets and their associated signal strengths from multiple emitter modules.
The problem I am facing is that previous data ...
0
votes
1
answer
269
views
webots can not use 3090 gpu in docker container through X11 forwarding
I am use X11 forwarding to start webots on a remote server with 3090 GPU, I have installed Nvidia GPU driver on that server, however, when I start webots, it saids the GPU is not meet the requirements ...
0
votes
1
answer
126
views
How to insert distance sensor in Kuka robot in webots software
I am trying to add a distance sensor to a kuka robot in webots software KUKA robot that has no field called children but I added the distance sensor in bodyslot field now the sensor is reading nan all ...
0
votes
1
answer
367
views
How can I encode and decode the depth image with opencv? I use the following code to get a depth image in webots, but fail. Thanks a lot
// `s` is the webots's rangefinder
auto buffer = (float*)s->getRangeImage();
cv::Mat img(cv::Size(width, height), CV_32FC1, buffer); // image data is float*
// check and success.
/...
0
votes
0
answers
59
views
Debug the Python code to setup the Pioneer 3DX from pioneer3dx_collision_avoidance.c
I am new to Webots application. I need to code a python program for the Pioneer 3DX robot to avoid collision from surroundings using Python. I am converting the pioneer3dx_collision_avoidance.c into ...
0
votes
0
answers
295
views
ImportError: cannot import name 'Robot' from 'controller' while using webot on vs code
from numpy.lib.function_base import average
from controller import Controller
from controller import Robot
from controller import Camera
from controller import Display
from vehicle import Car
import ...
1
vote
1
answer
260
views
"ValueError: `x0` is infeasible." for least_squares.py
I'm trying to use this code in Webots for one of the universal robots. The code works well until I try to the "ikResults" in line 49. The program is trying to use the least_squares.py but I'...
0
votes
0
answers
68
views
How to receive data from a Tcp/Ip connection in a webots controller?
I'm doing a project in the WEBOTS simulator and right now I'm implementing a TCP/IP communication to be able to pass information between controllers. In particular I have two controllers, one of them ...
-1
votes
1
answer
268
views
Question about getting global coordinates of lidar point cloud from relative in Webots
I need to do custom mapping of surroundings with lidar using mobile robot in Webots. What I use for that:
GPS for getting robot position.
Compass for getting direction robot.
Lidar for getting info ...
1
vote
1
answer
131
views
Communicating using receiver node in webots
I want to implement an emitter robot and a receiver robot in webots. I have written following code.
#include <webots/robot.h>
#include <webots/receiver.h>
#include <stdio.h>
#...
0
votes
1
answer
59
views
Having trouble with mavik2pro drone in webots
I was hoping someone could help me with my code. I am having trouble getting my drone to work, which is weird since the code worked before I had to restart the computer. But it keeps saying NameError: ...
1
vote
1
answer
89
views
How do I turn 2 cubes into a 3rd cube in Webots?
I'm trying to simulate an assembly factory. In which, several robots gather the necessary parts (objects A & B) and drop them off on the assembly table. Once A & B are both on the assembly ...
0
votes
1
answer
30
views
In WB Changing the texture while simulating
How to animate the texture of a shape in a proto or wbt file used in WeBots*?
There could have been c3d but it's not implemented, and we can't add gif as images.
*WeBots is a software to simulate ...
-1
votes
1
answer
85
views
printf a double variable with asterisk (a pointer)
I have this program in webots where I am extracting the color instance from the Wbcamerarecongnition and trying to print the color which according to documentation is made of 3D array for each color.
...
0
votes
0
answers
153
views
cv2 findArucoMarkers sees marker from far away but doesn't draw center point until closer
The Aruco marker is detected on the img but isn't fully detected because the cv2 drawing functions don't appear on the img until I'm closer to the marker.
I also have white boarders around the marker ...
0
votes
1
answer
175
views
How to make comments multiple lines and one line in .wbt files used as world files in WeBots
In WeBots and using programs with ROS2 you need to use world files with the .wbt extensions.
Does someone know how to comment one line or multiple lines ?
Thanks.
1
vote
1
answer
106
views
Can I run WeBots from Jupyter?
I am reading through Webots official tutorials, and I see they use their IDE, Pycharm etc. But can I use Jupyter? I like Jupyter's ability to run code block-by-block...
I see examples in the net, but ...
0
votes
0
answers
127
views
Can't detect objects with using a radar sensor
I'm trying to build my own robot model with radar sensor and detect other robots models in order to make my robot follow them. To implement, I attached a radar device to my robot and made a controller ...
1
vote
1
answer
150
views
Can we change the field Parameters (Environment Parameters) in Webots using the controller?
I am a new user to Webots. I just wanted to know whether the parameters that we set in the environment be able to change through the controller.
As an example, When we add a Distance sensor, will it ...
0
votes
1
answer
133
views
Voice command to Nao Webots simulator
Am trying to do an Android app to control nao robot using a webots simulator
and am trying to send voice command to choreograph by my pc microphone so any ideas how to do that
1
vote
0
answers
292
views
Import .obj and .mtl files in Webots using a PROTO file
I am trying to import a .obj with a .mtl linked to it. When importing it using the 'Import 3D Model' option, everything works perfectly, the material is well kept:
But when I try to import it from a ...
1
vote
1
answer
560
views
Can't connect controller to specific instance of Webots
I am trying using Webots in combination with stable-baselines3 for reeinforcment-learning purpose.
I tried using Webot with multiple instances, but connecting the controller to a specific one doesn't ...
1
vote
1
answer
202
views
Is it possible to monitor terminal for specific output?
I am using NodeJS to run webots by command line and have redirected the stdout too the node terminal. My problem is that I want to trigger an event based on a console log. I tried redirecting the ...
0
votes
1
answer
146
views
Webots pen camera recognition
I am trying to make a tic-tac-toe game in Webots.
I have 2 robot one that draw circle and the others draw crosses using the device "pen".
I need them to recognise when the other robot draws ...
0
votes
1
answer
122
views
Does Webots use at most one core of the CPU
I found that when I open multiple Webots, the maximum CPU utilization of each Webots in FAST mode is about 100. I want to know if each Webots uses up to 1 core of the CPU.
1
vote
1
answer
371
views
How do you add a PROTO node programmatically in Webots?
Using a Supervisor controller, is it possible to programmatically add Robot nodes to a running simulation which are defined in .proto files?
I tried using importMFNode, but it looks like it only ...
0
votes
1
answer
194
views
Thymio-II Webots Python simulator
I am trying to program Thymio-II using Python in Webots simulator. I have not understood how to access and control LEDs on Thymio-II. Are there any Python controller code examples for Thymio-II which ...