temas.Control
- class Control(port=8082, ip_address='')[source]
Bases:
objectThis class alows the control of motors and laser.
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/).
Point cloud scan status in perecent
get_pos()Get motor positions
Mean laser distance measurement
move(direction)Sends a movement command to the motor.
Move motor down in 1° steps
Move motor down in 0.5° steps
Move to home position
Move motor left in 1° steps
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 motor right in 1° steps
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 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
- 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
- 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