NAOqi Motion - Overview | API
Gets, for a specified chain, the position, relative to the specified frame, of the closest obstacle.
Parameters: |
|
---|---|
Returns: | Vector containing the AL::Math::Position3D of obstacle in meters (x, y, z). |
Checks if the external collision protection is activated on the given name.
Parameters: |
|
---|---|
Returns: | Return true if the external collision protection of the given name is activated. |
Gets the current orthogonal security distance used to check dangerous obstacles.
Returns: | distance in meters between any part of the robot and any obstacle in the direction of the motion. It defines the security area in which any obstacle detection stops the robot. Default value: 0.4m. |
---|
Gets the current tangential security distance used to check dangerous obstacles.
Returns: | distance in meters between any part of the robot and any obstacle. It defines the security area in which any obstacle detection stops the robot. Default value: 0.1m. |
---|
NAO | Enable/disable external collision protection of the robot. |
Pepper | Enable/disable external collision protection of the robot, but only if allowed by the owner. If not allowed, an exception is thrown.
|
For further details, see: Deactivation of the safety reflexes.
Parameters: |
|
---|
almotion_setExternalCollisionProtectionEnabled.py
# -*- encoding: UTF-8 -*-
import argparse
from naoqi import ALProxy
def main(robotIP, PORT=9559):
motionProxy = ALProxy("ALMotion", robotIP, PORT)
# Example showing how to activate "Move", "LArm" and "RArm" external anti collision
name = "All"
enable = True
motionProxy.setExternalCollisionProtectionEnabled(name, enable)
# Example showing how to deactivate "LArm" external anti collision
name = "LArm"
enable = False
motionProxy.setExternalCollisionProtectionEnabled(name, enable)
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("--ip", type=str, default="127.0.0.1",
help="Robot ip address")
parser.add_argument("--port", type=int, default=9559,
help="Robot port number")
args = parser.parse_args()
main(args.ip, args.port)
Defines the orthogonal security distance.
Parameters: |
|
---|
Defines the tangential security distance.
Parameters: |
|
---|
Raised when a chain velocity is clipped because an obstacle is too close.
Parameters: |
|
---|
Raised when a move command fails.
Parameters: |
|
---|
Deprecated since version 2.0.2: use ALMotion/MoveFailed() instead.
Raised when a move command fails because there is an obstacle in the direction of the move.
Parameters: |
|
---|