temas.Control

class Control(port=8082, ip_address='')[source]

Bases: object

This class alows the control of motors and laser.

__init__(port=8082, ip_address='')[source]

Methods

__init__([port, ip_address])

distance()

Laser distance measurment

get_pcl(path)

Retrieve the latest point cloud from the laser scan (e.g., located at C:/temp/).

get_point_cloud_scan_percent()

Point cloud scan status in perecent

get_pos()

Get motor positions

mean_distance()

Mean laser distance measurement

move(direction)

Sends a movement command to the motor.

move_down()

Move motor down in 1° steps

move_down_fine()

Move motor down in 0.5° steps

move_home()

Move to home position

move_left()

Move motor left in 1° steps

move_left_fine()

Move motor left in 0.5° steps

move_pos(phi, theta)

Move to the specified pan and tilt angles in degrees (e.g., 12.5, 11) with a step size of 0.5°.

move_right()

Move motor right in 1° steps

move_right_fine()

Move motor right in 0.5° steps

move_threaded(direction)

Starts the movement in a separate thread.

move_up()

Move motor up in 1° steps

move_up_fine()

Move motor up in 0.5° steps

start_point_cloud_scan(theta1, theta2, phi1, ...)

Starts a point cloud scan between the specified pan and tilt angle ranges.

stop_point_cloud_scan()

Stop point cloud scan

get_pcl(path)[source]

Retrieve the latest point cloud from the laser scan (e.g., located at C:/temp/).

Returns:

.ply file

distance()[source]

Laser distance measurment

Returns:

Value of the distance [cm]

Return type:

String

mean_distance()[source]

Mean laser distance measurement

Returns:

Value of the mean_distance [cm]

Return type:

String

move_pos(phi, theta)[source]

Move to the specified pan and tilt angles in degrees (e.g., 12.5, 11) with a step size of 0.5°.

Returns:

Status message indicating if the move was successful. Returns True if successful.

Return type:

String

get_pos()[source]

Get motor positions

Returns:

pan, tilt positions [°]

Return type:

String

move_home()[source]

Move to home position

move(direction)[source]

Sends a movement command to the motor.

move_threaded(direction)[source]

Starts the movement in a separate thread.

move_right()[source]

Move motor right in 1° steps

move_left()[source]

Move motor left in 1° steps

move_up()[source]

Move motor up in 1° steps

move_down()[source]

Move motor down in 1° steps

move_right_fine()[source]

Move motor right in 0.5° steps

move_left_fine()[source]

Move motor left in 0.5° steps

move_up_fine()[source]

Move motor up in 0.5° steps

move_down_fine()[source]

Move motor down in 0.5° steps

start_point_cloud_scan(theta1, theta2, phi1, phi2, color=1)[source]

Starts a point cloud scan between the specified pan and tilt angle ranges.

Parameters:
  • theta1 – Minimum elevation angle in degrees (-30 to 90, step size 0.5°)

  • theta2 – Maximum elevation angle in degrees (-30 to 90, step size 0.5°)

  • phi1 – Minimum azimuth angle in degrees (-60 to 60, step size 0.5°)

  • phi2 – Maximum azimuth angle in degrees (-60 to 60, step size 0.5°)

  • color – Color mode (default = 1)

Returns:

Status message indicating if the scan was started successfully. Returns True if successful.

Return type:

String

stop_point_cloud_scan()[source]

Stop point cloud scan

Returns:

Status message indicating if the scan was stopped successfully. Returns True if successful.

Return type:

String

get_point_cloud_scan_percent()[source]

Point cloud scan status in perecent

Returns:

Point cloud scan status [%]

Return type:

String