Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Untracked detection & tracked obstacle map publishing, integrating updated sensor fusion algorithm with the ObstacleMap interface #182

Open
wants to merge 43 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
02c52f1
Mostly copy-paste basic setup stuff for the node that projects the de…
pliam1105 Oct 20, 2024
cbac7c0
Merge remote-tracking branch 'origin/pliam1105/improved_perception' i…
pliam1105 Oct 20, 2024
74c657f
Added some bbox specific stuff (still mostly setup, will now get to t…
pliam1105 Oct 20, 2024
4c353e2
Added the code that selects and publishes the point cloud points insi…
pliam1105 Oct 23, 2024
013be26
Merge remote-tracking branch 'origin/main' into pliam1105/improved_pe…
pliam1105 Oct 23, 2024
8fee93b
Merge remote-tracking branch 'origin/main' into pliam1105/improved_pe…
pliam1105 Oct 27, 2024
e76851f
Made it work and visualize the points in the bounding boxes in RViZ (…
pliam1105 Nov 6, 2024
b2d402a
Minor change (forgot something), the custom message should work too now
pliam1105 Nov 6, 2024
25742ec
Made it actually work, fixed the out of bounds errors (swapped dimens…
pliam1105 Nov 8, 2024
c10e1f5
Merge remote-tracking branch 'origin/main' into pliam1105/improved_pe…
pliam1105 Nov 8, 2024
65c73fe
progress in refining all point clouds (for each object) to have actua…
pliam1105 Nov 11, 2024
aed17e1
add to-do
pliam1105 Nov 11, 2024
c5cfa9c
Not much, just added the command that finds the contours
pliam1105 Nov 13, 2024
2ce7b8f
Setup the parameters for the cluster and contour matching and selecti…
pliam1105 Nov 18, 2024
220a4ce
Added the conditional euclidean clustering code (using an HSV differe…
pliam1105 Nov 22, 2024
812df90
Small commit, converting contour points to original image coordinates…
pliam1105 Nov 22, 2024
0c5b21c
Finished the code that selects the optimal cluster-contour pair, need…
pliam1105 Nov 25, 2024
f566525
Code for publishing the results of the refined object clouds & visual…
pliam1105 Nov 27, 2024
9e1037b
Fixed compile-time errors, colcon builds, to be tested
pliam1105 Dec 2, 2024
db89c6c
Merge remote-tracking branch 'origin/main' into pliam1105/refined_obj…
pliam1105 Dec 2, 2024
4c24a27
debugging, finding clusters & contours seems to work now, now need to…
pliam1105 Dec 2, 2024
627968f
Added visualizations, seems to mostly work, crashes at some points
pliam1105 Dec 4, 2024
0528821
Debugging, fixed minor mistake, doesn't crash now, need to check the …
pliam1105 Dec 6, 2024
14d2240
Debugging, having issues retrieving & converting colors from image (a…
pliam1105 Dec 8, 2024
75eb1a2
IT FINALLY WORKS (seems to work good, only includes points that are i…
pliam1105 Dec 11, 2024
f0a87aa
Now the object contour visualization publisher works too
pliam1105 Dec 11, 2024
962cb85
Removed some debugging/old stuff
pliam1105 Dec 11, 2024
dc59a78
removing useless stuff
pliam1105 Dec 13, 2024
4d48263
Changed topic parameters to remappings, and fixed the point glitching…
pliam1105 Dec 15, 2024
dca5455
Minor name changes
pliam1105 Dec 15, 2024
2009359
Merge remote-tracking branch 'origin/main' into pliam1105/refined_obj…
pliam1105 Dec 19, 2024
bd61857
Boilerplate code for object tracking & map publishing node
pliam1105 Dec 19, 2024
2561c43
Merge remote-tracking branch 'origin/main' into pliam1105/refined_obj…
pliam1105 Jan 17, 2025
24a92db
Setup (mostly some copied stuff, with some modifications, from obstac…
pliam1105 Jan 18, 2025
f9dd216
Added code to publish untracked obstacles in the required obstacle ma…
pliam1105 Jan 21, 2025
f85d781
Dashboard revert (not essential)
pliam1105 Jan 21, 2025
043c119
Fixed it, seems to correctly publish untracked obstacles in the Obsta…
pliam1105 Jan 22, 2025
ec934c1
Coded obstacle tracking & map publishing, not built or tested yet
pliam1105 Jan 23, 2025
da81a8a
Now builds
pliam1105 Jan 24, 2025
571f3ef
Finished debugging, seems to work great (obstacle map not that glitch…
pliam1105 Jan 24, 2025
4d1d0c6
Removed redundancies and added explanation of function doing the trac…
pliam1105 Jan 31, 2025
c69317b
Added node to sim.launch.py
pliam1105 Jan 31, 2025
46bb2af
resolve dashboard
toyat522 Feb 9, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import os
from ament_index_python.packages import get_package_share_directory


class WaypointFinder(Node):
def __init__(self):
super().__init__("waypoint_finder")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
orange: [10, 30, 40, 255, 40, 255]
red: [0, 15, 40, 255, 40, 255]
red2: [150, 179, 40, 255, 40, 255]
green: [35, 80, 40, 255, 40, 255]
black: [0, 0, 0, 0, 0, 50]
white: [0, 0, 0, 10, 200, 255]
7 changes: 7 additions & 0 deletions all_seaing_bringup/config/perception/matching_weights.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
clustering_distance_weight: 1.0
clustering_color_weights: [1.0, 0.0, 0.0]
clustering_color_thres: 30
cluster_contour_distance_weight: 1.0
cluster_contour_color_weights: [1.0, 0.0, 0.0]
contour_detection_color_weights: [1.0, 0.0, 0.0]
cluster_contour_size_weight: 1.0
45 changes: 44 additions & 1 deletion all_seaing_bringup/launch/sim.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,12 @@ def launch_setup(context, *args, **kwargs):
color_ranges = os.path.join(
bringup_prefix, "config", "perception", "color_ranges.yaml"
)

matching_weights = os.path.join(
bringup_prefix, "config", "perception", "matching_weights.yaml"
)
contour_matching_color_ranges = os.path.join(
bringup_prefix, "config", "perception", "contour_matching_color_ranges.yaml"
)
subprocess.run(["cp", "-r", os.path.join(bringup_prefix, "tile"), "/tmp"])

launch_rviz = LaunchConfiguration("launch_rviz")
Expand Down Expand Up @@ -162,6 +167,42 @@ def launch_setup(context, *args, **kwargs):
],
)

bbox_project_pcloud_node = launch_ros.actions.Node(
package="all_seaing_perception",
executable="bbox_project_pcloud",
output="screen",
remappings=[
("camera_info_topic", "/wamv/sensors/cameras/front_left_camera_sensor/camera_info"),
("camera_topic", "/wamv/sensors/cameras/front_left_camera_sensor/image_raw"),
("lidar_topic", "point_cloud/filtered")
],
parameters=[
{"bbox_object_margin": 0.0},
{"color_label_mappings_file": color_label_mappings},
{"color_ranges_file": color_ranges},
{"obstacle_size_min": 2},
{"obstacle_size_max": 60},
{"clustering_distance": 1.0},
{"matching_weights_file": matching_weights},
{"contour_matching_color_ranges_file": contour_matching_color_ranges}
]
)

object_tracking_map_node = launch_ros.actions.Node(
package="all_seaing_perception",
executable="object_tracking_map",
output="screen",
arguments=['--ros-args', '--log-level', 'debug'],
remappings=[
("camera_info_topic", "/wamv/sensors/cameras/front_left_camera_sensor/camera_info"),
],
parameters=[
{"global_frame_id": "odom"},
{"obstacle_seg_thresh": 10.0},
{"obstacle_drop_thresh": 1.0},
]
)

rviz_node = launch_ros.actions.Node(
package="rviz2",
executable="rviz2",
Expand Down Expand Up @@ -274,6 +315,8 @@ def launch_setup(context, *args, **kwargs):
controller_server,
obstacle_bbox_overlay_node,
obstacle_bbox_visualizer_node,
bbox_project_pcloud_node,
object_tracking_map_node,
obstacle_detector_node,
color_segmentation_node,
point_cloud_filter_node,
Expand Down
3 changes: 3 additions & 0 deletions all_seaing_interfaces/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,11 @@ rosidl_generate_interfaces(${PROJECT_NAME}
"msg/WaypointArray.msg"
"msg/ObstacleCounter.msg"
"msg/ObstacleCounterArray.msg"
"msg/LabeledObjectPointCloud.msg"
"msg/LabeledObjectPointCloudArray.msg"
DEPENDENCIES
geometry_msgs
sensor_msgs
)

ament_auto_package()
4 changes: 4 additions & 0 deletions all_seaing_interfaces/msg/LabeledObjectPointCloud.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
builtin_interfaces/Time time
int8 label
sensor_msgs/PointCloud2 cloud
sensor_msgs/Image segment
1 change: 1 addition & 0 deletions all_seaing_interfaces/msg/LabeledObjectPointCloudArray.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
all_seaing_interfaces/LabeledObjectPointCloud[] objects
2 changes: 1 addition & 1 deletion all_seaing_interfaces/msg/Obstacle.msg
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ geometry_msgs/Point bbox_min
geometry_msgs/Point bbox_max

geometry_msgs/Point global_bbox_min
geometry_msgs/Point global_bbox_max
geometry_msgs/Point global_bbox_max
17 changes: 16 additions & 1 deletion all_seaing_perception/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ ament_auto_find_build_dependencies()

find_package(yaml-cpp REQUIRED)

find_package(PCL 1.12 REQUIRED COMPONENTS common visualization io)

ament_auto_add_executable(
obstacle_detector
${PROJECT_NAME}/obstacle_detector.cpp
Expand All @@ -33,15 +35,28 @@ ament_auto_add_executable(
obstacle_bbox_visualizer
${PROJECT_NAME}/obstacle_bbox_visualizer.cpp
)
ament_auto_add_executable(
bbox_project_pcloud
${PROJECT_NAME}/bbox_project_pcloud.cpp
)
ament_auto_add_executable(
object_tracking_map
${PROJECT_NAME}/object_tracking_map.cpp
${PROJECT_NAME}/obstacle.cpp
)

target_link_libraries(obstacle_bbox_visualizer yaml-cpp)
target_link_libraries(bbox_project_pcloud yaml-cpp ${PCL_LIBRARIES} ${PCL_COMMON_LIBRARIES} ${PCL_IO_LIBRARIES} ${PCL_VISUALIZATION_LIBRARIES})
target_link_libraries(object_tracking_map yaml-cpp ${PCL_LIBRARIES} ${PCL_COMMON_LIBRARIES} ${PCL_IO_LIBRARIES} ${PCL_VISUALIZATION_LIBRARIES})

install(TARGETS
obstacle_detector
obstacle_bbox_overlay
point_cloud_filter
point_cloud_image_overlay
obstacle_bbox_visualizer
obstacle_bbox_visualizer
bbox_project_pcloud
object_tracking_map
DESTINATION lib/${PROJECT_NAME}
)

Expand Down
Loading