storm_kit.geom.nn_model.robot_self_collision module

class RobotSelfCollisionNet(n_joints=0)[source]

Bases: object

This class loads a network to predict the signed distance given a robot joint config.

initialize class

Parameters

n_joints (int, optional) – Number of joints, same as number of channels for nn input. Defaults to 0.

check_collision(q)[source]

Check collision given joint config. Requires classifier like training.

Parameters

q (tensor) – input batch of joint configs [b, n_joints]

Returns

probability of collision of links, from sigmoid value.

Return type

[tensor]

compute_signed_distance(q)[source]

Compute the signed distance given the joint config.

Parameters

q (tensor) – input batch of joint configs [b, n_joints]

Returns

largest signed distance between any two non-consecutive links of the robot.

Return type

[tensor]

load_weights(f_name, tensor_args)[source]

Loads pretrained network weights if available.

Parameters
  • f_name (str) – file name, this is relative to weights folder in this repo.

  • tensor_args (Dict) – device and dtype for pytorch tensors