Skip to main content
Addressed comments
Source Link

It looks like there is some noise in the sensor readings. Make sure your simulator is reporting ground truth, or you have some tolerance to noise.

See here: http://www.cyberbotics.com/dvd/common/doc/webots/guide/section9.2.html

In particular

In Supervisor code:

To get the 3D position of any Transform (or derived) node in the Supervisor code: you can use the wb_supervisor_node_get_position() function. Please check this function's description in the Reference Manual.

To get the 3D position of any Transform (or derived) node placed at the root of the Scene Tree (the nodes visible when the Scene Tree is completely collapsed), you can use the wb_supervisor_field_get_sf_vec3f() function. Here is an example.

A simulation example that shows both the GPS and the Supervisor techniques is included in the Webots installation, you just need to open this world: $WEBOTS_HOME/projects/samples/devices/worlds/gps.wbt.


IF in fact noise in the state estimate is the problem (bit IF), then the way to compensate for such errors is to use an estimate of your state and error models. It's beyond the scope of the question, unfortunately. If you want to do obstacle avoidance AND you are certain that sensor error is the issue, I suggest you:

  1. Check for obstacles in a wide band (a fat circle) which could represent your trajectory with a bit of error

  2. Run a filter to get an estimate of robot position, then find the "likely" collisions

  3. Only look for obstacles over a small window into the future. In the short term, your state estimate should be fine.

However, these are heavy handed fixes for what is likely a small problem.

It looks like there is some noise in the sensor readings. Make sure your simulator is reporting ground truth, or you have some tolerance to noise.

See here: http://www.cyberbotics.com/dvd/common/doc/webots/guide/section9.2.html

In particular

In Supervisor code:

To get the 3D position of any Transform (or derived) node in the Supervisor code: you can use the wb_supervisor_node_get_position() function. Please check this function's description in the Reference Manual.

To get the 3D position of any Transform (or derived) node placed at the root of the Scene Tree (the nodes visible when the Scene Tree is completely collapsed), you can use the wb_supervisor_field_get_sf_vec3f() function. Here is an example.

A simulation example that shows both the GPS and the Supervisor techniques is included in the Webots installation, you just need to open this world: $WEBOTS_HOME/projects/samples/devices/worlds/gps.wbt.

It looks like there is some noise in the sensor readings. Make sure your simulator is reporting ground truth, or you have some tolerance to noise.

See here: http://www.cyberbotics.com/dvd/common/doc/webots/guide/section9.2.html

In particular

In Supervisor code:

To get the 3D position of any Transform (or derived) node in the Supervisor code: you can use the wb_supervisor_node_get_position() function. Please check this function's description in the Reference Manual.

To get the 3D position of any Transform (or derived) node placed at the root of the Scene Tree (the nodes visible when the Scene Tree is completely collapsed), you can use the wb_supervisor_field_get_sf_vec3f() function. Here is an example.

A simulation example that shows both the GPS and the Supervisor techniques is included in the Webots installation, you just need to open this world: $WEBOTS_HOME/projects/samples/devices/worlds/gps.wbt.


IF in fact noise in the state estimate is the problem (bit IF), then the way to compensate for such errors is to use an estimate of your state and error models. It's beyond the scope of the question, unfortunately. If you want to do obstacle avoidance AND you are certain that sensor error is the issue, I suggest you:

  1. Check for obstacles in a wide band (a fat circle) which could represent your trajectory with a bit of error

  2. Run a filter to get an estimate of robot position, then find the "likely" collisions

  3. Only look for obstacles over a small window into the future. In the short term, your state estimate should be fine.

However, these are heavy handed fixes for what is likely a small problem.

Source Link

It looks like there is some noise in the sensor readings. Make sure your simulator is reporting ground truth, or you have some tolerance to noise.

See here: http://www.cyberbotics.com/dvd/common/doc/webots/guide/section9.2.html

In particular

In Supervisor code:

To get the 3D position of any Transform (or derived) node in the Supervisor code: you can use the wb_supervisor_node_get_position() function. Please check this function's description in the Reference Manual.

To get the 3D position of any Transform (or derived) node placed at the root of the Scene Tree (the nodes visible when the Scene Tree is completely collapsed), you can use the wb_supervisor_field_get_sf_vec3f() function. Here is an example.

A simulation example that shows both the GPS and the Supervisor techniques is included in the Webots installation, you just need to open this world: $WEBOTS_HOME/projects/samples/devices/worlds/gps.wbt.