scenic.simulators.webots.utils

Various utilities for working with Webots scenarios.

Summary of Module Members

Functions

scenicToWebotsPosition

Convert a Scenic position to a Webots position.

scenicToWebotsRotation

Convert a Scenic heading to a Webots rotation vector.

webotsToScenicPosition

Convert a Webots position to a Scenic position.

webotsToScenicRotation

Convert a Webots rotation vector to a Scenic heading.

Member Details

webotsToScenicPosition(pos)[source]

Convert a Webots position to a Scenic position.

Drops the Webots Y coordinate.

scenicToWebotsPosition(pos, y=0)[source]

Convert a Scenic position to a Webots position.

webotsToScenicRotation(rot, tolerance2D=None)[source]

Convert a Webots rotation vector to a Scenic heading.

Assumes the object lies in the Webots X-Z plane, with a rotation axis close to the Y axis. If tolerance2D is given, returns None if the orientation of the object is not sufficiently close to being 2D.

scenicToWebotsRotation(heading)[source]

Convert a Scenic heading to a Webots rotation vector.