Skip to content

Commit

Permalink
Merge branch 'main' into 538-feature-update-and-use-ultralytics-yolov…
Browse files Browse the repository at this point in the history
…11-for-object-detection
  • Loading branch information
SirMDA committed Nov 29, 2024
2 parents 38d85f7 + 0a8c40e commit 4cc8272
Show file tree
Hide file tree
Showing 9 changed files with 450 additions and 32 deletions.
22 changes: 15 additions & 7 deletions code/planning/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@ project(planning)
find_package(catkin REQUIRED COMPONENTS
perception
rospy
rosout
roslaunch
std_msgs
geometry_msgs
message_generation
)

roslaunch_add_file_check(launch)
Expand Down Expand Up @@ -48,9 +51,11 @@ catkin_python_setup()
## * add every package in MSG_DEP_SET to generate_messages(DEPENDENCIES ...)

## Generate messages in the 'msg' folder
# add_message_files(
# MinDistance.msg
# )
add_message_files(
FILES
NavigationPoint.msg
Trajectory.msg
)

## Generate services in the 'srv' folder
# add_service_files(
Expand All @@ -67,9 +72,12 @@ catkin_python_setup()
# )

## Generate added messages and services with any dependencies listed here
# generate_messages(
# perception
# )
generate_messages(
DEPENDENCIES
std_msgs
perception
geometry_msgs
)

################################################
## Declare ROS dynamic reconfigure parameters ##
Expand Down Expand Up @@ -105,7 +113,7 @@ catkin_package(
# LIBRARIES planning
# CATKIN_DEPENDS other_catkin_pkg
# DEPENDS system_lib
CATKIN_DEPENDS perception rospy
CATKIN_DEPENDS perception rospy message_runtime
)

###########
Expand Down
3 changes: 3 additions & 0 deletions code/planning/msg/NavigationPoint.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
geometry_msgs/Point position
float32 speed
uint8 behaviour
2 changes: 2 additions & 0 deletions code/planning/msg/Trajectory.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Header header
planning/NavigationPoint[] navigationPoints
4 changes: 4 additions & 0 deletions code/planning/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@
<!-- <test_depend>gtest</test_depend> -->
<!-- Use doc_depend for packages you need only for building documentation: -->
<!-- <doc_depend>doxygen</doc_depend> -->
<build_depend>message_generation</build_depend>
<exec_depend>message_runtime</exec_depend>

<build_depend>rospy</build_depend>
<build_depend>roslaunch</build_depend>

Expand All @@ -57,6 +60,7 @@
<exec_depend>carla_msgs</exec_depend>
<exec_depend>sensor_msgs</exec_depend>
<exec_depend>std_msgs</exec_depend>
<exec_depend>geometry_msgs</exec_depend>
<exec_depend>perception</exec_depend>

<build_depend>perception</build_depend>
Expand Down
8 changes: 8 additions & 0 deletions code/planning/src/BehaviourEnum.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from enum import IntEnum

# getattr(Behaviour, "name").value returns the ID
# Behaviour(id) returns Behaviour.NAME


class BehaviourEnum(IntEnum):
CRUISING = 0
Binary file modified doc/assets/overview.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion doc/general/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ This Folder contains instruction on installation, execution and architecture of

1. [Installation](./installation.md)
2. [Execution](./execution.md)
3. [Current architecture of the agent](./architecture.md)
3. [Current architecture of the agent](./architecture_current.md)
4. [Planned architecture of the agent](./architecture_planned.md)
371 changes: 371 additions & 0 deletions doc/general/architecture_current.md

Large diffs are not rendered by default.

69 changes: 45 additions & 24 deletions doc/general/architecture.md → doc/general/architecture_planned.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,37 +3,39 @@
**Summary:** This page gives an overview over the planned general architecture of the vehicle agent.
The document contains an overview over all [nodes](#overview) and [topics](#topics).

- [Planned architecture of vehicle agent](#planned-architecture-of-vehicle-agent)
- [Overview](#overview)
- [Perception](#perception)
- [Obstacle Detection and Classification](#obstacle-detection-and-classification)
- [Traffic Light Detection](#traffic-light-detection)
- [Localization](#localization)
- [Planning](#planning)
- [Global Planning](#global-planning)
- [Decision Making](#decision-making)
- [Local Planning](#local-planning)
- [Collision Check](#collision-check)
- [ACC](#acc)
- [Motion Planning](#motion-planning)
- [Acting](#acting)
- [Path following with Steering Controllers](#path-following-with-steering-controllers)
- [Velocity control](#velocity-control)
- [Vehicle controller](#vehicle-controller)
- [Visualization](#visualization)
- [Overview](#overview)
- [Perception](#perception)
- [Vision Node](#vision-node)
- [Traffic Light Detection](#traffic-light-detection)
- [Position Heading Node](#position-heading-node)
- [Distance to Objects](#distance-to-objects)
- [Localization](#localization)
- [Planning](#planning)
- [Global Planning](#global-planning)
- [Decision Making](#decision-making)
- [Local Planning](#local-planning)
- [Collision Check](#collision-check)
- [ACC](#acc)
- [Motion Planning](#motion-planning)
- [Acting](#acting)
- [Path following with Steering Controllers](#path-following-with-steering-controllers)
- [Velocity control](#velocity-control)
- [Vehicle controller](#vehicle-controller)
- [Visualization](#visualization)

## Overview

The vehicle agent is split into three major components: [Perception](#Perception), [Planning](#Planning)
and [Acting](#Acting).
A separate node is responsible for the [visualization](#Visualization).
The topics published by the Carla bridge can be
found [here](https://carla.readthedocs.io/projects/ros-bridge/en/latest/ros_sensors/).
The msgs necessary to control the vehicle via the Carla bridge can be
found [here](https://carla.readthedocs.io/en/0.9.8/ros_msgs/#CarlaEgoVehicleControlmsg)
found [here](https://carla.readthedocs.io/projects/ros-bridge/en/latest/ros_sensors/).\
The messages necessary to control the vehicle via the Carla bridge can be
found [here](https://carla.readthedocs.io/en/0.9.8/ros_msgs/#CarlaEgoVehicleControlmsg).\

![Architecture overview](../assets/overview.jpg)
The miro-board can be found [here](https://miro.com/welcomeonboard/a1F0d1dya2FneWNtbVk4cTBDU1NiN3RiZUIxdGhHNzJBdk5aS3N4VmdBM0R5c2Z1VXZIUUN4SkkwNHpuWlk2ZXwzNDU4NzY0NTMwNjYwNzAyODIzfDI=?share_link_id=785020837509).
![Architecture overview](../assets/overview.jpg "Connections between nodes visualized")
![Department node overview](../assets/research_assets/node_path_ros.png "In- and outgoing topics for every node of the departments")

## Perception

Expand All @@ -43,7 +45,7 @@ environment representation that can be used by the [Planning](#Planning) for fur
Further information regarding the perception can be found [here](../perception/README.md).
Research for the perception can be found [here](../research/perception/README.md).

### Obstacle Detection and Classification
### Vision Node

Evaluates sensor data to detect and classify objects around the ego vehicle.
Other road users and objects blocking the vehicle's path are recognized.
Expand All @@ -52,17 +54,28 @@ In the case of dynamic objects, an attempt is made to recognize the direction an

Subscriptions:

- ```radar``` ([sensor_msgs/PointCloud2](https://docs.ros.org/en/api/sensor_msgs/html/msg/PointCloud2.html))
- ```lidar``` ([sensor_msgs/PointCloud2](https://docs.ros.org/en/api/sensor_msgs/html/msg/PointCloud2.html))
- ```rgb_camera``` ([sensor_msgs/Image](https://docs.ros.org/en/api/sensor_msgs/html/msg/Image.html))
- ````gnss```` ([sensor_msgs/NavSatFix](https://carla.readthedocs.io/projects/ros-bridge/en/latest/ros_sensors/))
- ```map``` ([std_msgs/String](https://docs.ros.org/en/api/std_msgs/html/msg/String.html))
- ```radar``` ([sensor_msgs/PointCloud2](https://docs.ros.org/en/api/sensor_msgs/html/msg/PointCloud2.html)) SOON TO COME

Publishes:

- ```obstacles``` (Custom msg:
obstacle ([vision_msgs/Detection3DArray Message](http://docs.ros.org/en/api/vision_msgs/html/msg/Detection3DArray.html))
and its classification ([std_msgs/String Message](http://docs.ros.org/en/noetic/api/std_msgs/html/msg/String.html)))
- ```segmented_image``` ([sensor_msgs/Image](https://docs.ros.org/en/api/sensor_msgs/html/msg/Image.html))
- /paf/hero/Center/segmented_image
- /paf/hero/Back/segmented_image
- /paf/hero/Left/segmented_image
- /paf/hero/Right/segmented_image
- ```segmented_traffic_light``` ([sensor_msgs/Image](https://docs.ros.org/en/api/sensor_msgs/html/msg/Image.html))
- ```object_distance``` ([sensor_msgs/Float32MultiArray](https://docs.ros.org/en/noetic/api/std_msgs/html/msg/Float32MultiArray.html))
- /paf/hero/Center/object_distance
- /paf/hero/Back/object_distance
- /paf/hero/Left/object_distance
- /paf/hero/Right/object_distance

### Traffic Light Detection

Expand All @@ -84,6 +97,14 @@ Publishes:
position ([geometry_msgs/Pose Message](http://docs.ros.org/en/noetic/api/geometry_msgs/html/msg/Pose.html)),
distance_to_stop_line ([std_msgs/Float64 Message](http://docs.ros.org/en/api/std_msgs/html/msg/Float64.html)))

### Position Heading Node

There are currently no planned improvements of the Position Heading Node.

### Distance to Objects

There are currently no planned improvements for Distance to Objects.

### Localization

Provides corrected accurate position, direction and speed of the ego vehicle
Expand Down

0 comments on commit 4cc8272

Please sign in to comment.