Jetracer Navigation package#
- class ROS_Stack.jetracer_speedway_navigation.src.object_detection.ObjectDetection(model_ia_path: str)[source]#
Bases:
ThreadClass to subscribe a topic to take image and by means of IA extract the lane and lines segmentation. Them process the segmentation, to extract the desired point to go the robot
- publish_command(result_objects: dict) → None[source]#
- Void to publish a dictionary, with:
Key: name of object detection (see object_process.py to now possible detections)
Value: for each key is a list with centroid of all object detections.
Only publish car and stop sign info. TODO for the rest of detections.
- Parameters:
result_objects (dict) – Dictionary with all objects detections
- ROS_Stack.jetracer_speedway_navigation.src.object_detection.signal_handler(signal, frame) → None[source]#
- class ROS_Stack.jetracer_speedway_navigation.src.publish_goalPoint.ProcessImage(model_ia_path: str)[source]#
Bases:
ThreadClass to subscribe a topic to take image and by means of IA extract the lane and lines segmentation. Them process the segmentation, to extract the desired point to go the robot
- publish_point(desired_point: utils.Point) → None[source]#
Void to publish desired point in Points format. The topic to publish is “jetracer_vels”
- Parameters:
angle_deg (float) – Angle
- ROS_Stack.jetracer_speedway_navigation.src.publish_goalPoint.signal_handler(signal, frame) → None[source]#
- class ROS_Stack.jetracer_speedway_navigation.src.security_stop.SecurityStop[source]#
Bases:
Thread- run() → None[source]#
Method representing the thread’s activity.
You may override this method in a subclass. The standard run() method invokes the callable object passed to the object’s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.
- class ROS_Stack.jetracer_speedway_navigation.src.utils.image_process.Features_Detection[source]#
Bases:
objectClass to extract the goal point in the image Errors:
1: No detection
2: Other error
- process(result: list) → Point[source]#
- Function to get the desired point (this point will be a point in the center of the lane).
- For get the point use different methods. Methods implement:
- RIGHT CORNER – MIDDLE LINE -> Detect right corner line and middle line. Return the center point of both masks’ centroidsRIGHT LANE -> Detect right lane. Return the centroid of lane maskRIGHT CORNER -> Detect right corner line. Return the mask’s centroid adding right offset (to center in the lane)MIDDLE LINE -> Detect middle line. Return the mask’s centroid adding mid offset (to center in the lane)
- TODO: Methods to implement:
- lane_middle_right -> Detections of right Lane, middle Line and right corner Linelane_right -> Detections of right Lane and right corner Linelane_middle -> Detections of right Lane and middle Line
- Parameters:
result (list) – Result of the prediction
- Raises:
ValueError – Possible value error - 1: No detections
- Returns:
Return the point in the middle of right lane
- Return type:
- class ROS_Stack.jetracer_speedway_navigation.src.utils.utils.Point(x: int, y: int)[source]#
Bases:
object- displace(x: int = 0, y: int = 0) → Point[source]#
Function to displace “m” px and “n” px in (x, y)
- Parameters:
x (int, optional) – Displacement in the x axi. Defaults to 0.
y (int, optional) – Displacement in the y axi. Defaults to 0.
- Returns:
Return the self point displaced
- Return type:
- is_right_than(other_point: Point) → bool[source]#
Function to know is self point is in a more to the right position than other point
- Parameters:
other_point (Point) – Other point to compare
- Returns:
Return True or False if self point is more to the right than other point
- Return type:
bool