Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: leggedrobotics/darknet_ros
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: qrthg/darknet_ros
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Can’t automatically merge. Don’t worry, you can still create the pull request.
  • 3 commits
  • 4 files changed
  • 1 contributor

Commits on May 9, 2018

  1. Copy the full SHA
    6f4c198 View commit details
  2. Copy the full SHA
    e07e2ba View commit details
  3. Copy the full SHA
    3c8ff73 View commit details
Showing with 17 additions and 16 deletions.
  1. +6 −5 darknet_ros/CMakeLists.txt
  2. +6 −6 darknet_ros/config/ros.yaml
  3. +1 −1 darknet_ros/config/yolov3.yaml
  4. +4 −4 darknet_ros/src/YoloObjectDetector.cpp
11 changes: 6 additions & 5 deletions darknet_ros/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -19,14 +19,15 @@ if (CUDA_FOUND)
message(STATUS "CUDA Libararies: ${CUDA_LIBRARIES}")
set(
CUDA_NVCC_FLAGS
-D_FORCE_INLINES
${CUDA_NVCC_FLAGS};
-O3
-gencode arch=compute_30,code=sm_30
-gencode arch=compute_35,code=sm_35
-gencode arch=compute_50,code=[sm_50,compute_50]
# -gencode arch=compute_30,code=sm_30
# -gencode arch=compute_35,code=sm_35
# -gencode arch=compute_50,code=[sm_50,compute_50]
-gencode arch=compute_52,code=[sm_52,compute_52]
-gencode arch=compute_61,code=sm_61
-gencode arch=compute_62,code=sm_62
# -gencode arch=compute_61,code=sm_61
# -gencode arch=compute_62,code=sm_62
)
add_definitions(-DGPU)
else()
12 changes: 6 additions & 6 deletions darknet_ros/config/ros.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
subscribers:

camera_reading:
topic: /camera/rgb/image_raw
queue_size: 1
topic: /img_out
queue_size: 0

actions:

@@ -13,18 +13,18 @@ publishers:

object_detector:
topic: /darknet_ros/found_object
queue_size: 1
queue_size: 0
latch: false

bounding_boxes:
topic: /darknet_ros/bounding_boxes
queue_size: 1
queue_size: 0
latch: false

detection_image:
topic: /darknet_ros/detection_image
queue_size: 1
latch: true
queue_size: 0
latch: false

image_view:

2 changes: 1 addition & 1 deletion darknet_ros/config/yolov3.yaml
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ yolo_model:
weight_file:
name: yolov3.weights
threshold:
value: 0.3
value: 0.4
detection_classes:
names:
- person
8 changes: 4 additions & 4 deletions darknet_ros/src/YoloObjectDetector.cpp
Original file line number Diff line number Diff line change
@@ -261,8 +261,8 @@ bool YoloObjectDetector::publishDetectionImage(const cv::Mat& detectionImage)
if (detectionImagePublisher_.getNumSubscribers() < 1)
return false;
cv_bridge::CvImage cvImage;
cvImage.header.stamp = ros::Time::now();
cvImage.header.frame_id = "detection_image";
cvImage.header.stamp = imageHeader_.stamp;
cvImage.header.frame_id = imageHeader_.frame_id;
cvImage.encoding = sensor_msgs::image_encodings::BGR8;
cvImage.image = detectionImage;
detectionImagePublisher_.publish(*cvImage.toImageMsg());
@@ -612,8 +612,8 @@ void *YoloObjectDetector::publishInThread()
}
}
}
boundingBoxesResults_.header.stamp = ros::Time::now();
boundingBoxesResults_.header.frame_id = "detection";
boundingBoxesResults_.header.stamp = imageHeader_.stamp;
boundingBoxesResults_.header.frame_id = imageHeader_.frame_id;
boundingBoxesResults_.image_header = imageHeader_;
boundingBoxesPublisher_.publish(boundingBoxesResults_);
} else {