-
Notifications
You must be signed in to change notification settings - Fork 2
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
72 Add YOLO object detection #167
Conversation
Still WIP, not fully done yet. Still TODO:
|
7765b26
to
aecd39b
Compare
#include <functional> | ||
#include <deque> | ||
|
||
class BoundingBoxTransformer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docs
, tf_timeout_(tf_timeout) | ||
{} | ||
|
||
void handleCameraImage(const sensor_msgs::ImageConstPtr& image_msg, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we use capital letters for all words in the function names for the rest of the codebase (except for mapviz plugins)
tfScalar radius; | ||
tfScalar height; | ||
|
||
BoundingCylinder(std::string objectClass, int id, ros::Time creationTime, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you ever use the default constructor? If not can you delete it?
@@ -0,0 +1,46 @@ | |||
cmake_minimum_required(VERSION 2.8.3) | |||
project(propbot_object_detection) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename to propbot_perception
, or put this in a propbot_perception
directory and name it propbot_object_detection
@@ -0,0 +1,128 @@ | |||
# Propbot Object Detection |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great README! I won't comment on this for now, once you put it into the design doc, we can fix things up and open another pr to change the readme if necessary
//ROS_INFO_STREAM("Find Angles: " << angle_left << ", " << angle_right << | ||
// " from " << laser->angle_min << ", " << laser->angle_max); | ||
|
||
float left_from_min = angle_left - laser->angle_min; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would be also helpful to provide a brief description above each function
} | ||
|
||
if (groups.size() >= 2) { | ||
//if (groups.size() >= 3) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove comment
last_image_time_ = image_msg->header.stamp; | ||
|
||
// Update our camera model from this image | ||
pinhole_camera_.fromCameraInfo(cam_info_msg); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the CameraInfo
message shouldn't change during operation. It would be sufficient for you to just load it in once. The CameraInfo
message depends on some calibrations that are done before operation.
const darknet_ros_msgs::BoundingBoxesConstPtr& bb_msg) | ||
{ | ||
if (!pinhole_camera_.initialized()) { | ||
ROS_WARN_STREAM_THROTTLE(1, "Waiting for Camera Initialization"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use ROS_WARN
instead to keep things consistent with the rest of our code
|
||
// Find a 3D point (in the laser frame) corresponding to the pixel | ||
// this is done by extending the ray from camera to pixel out to ray length | ||
auto projectPt = [&](int x, int y) -> tf::Point { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice, why a lambda instead of a private function tho? bc nothing else uses it?
|
||
<!--- Launch Object Detection --> | ||
<include file="$(find propbot_object_detection)/launch/detect_objects.launch" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add a setting "track_dynamic_objects"?
Adds YOLO object detection into simulation.
The integration of YOLO into ROS is done by darknet_ros. Unfortunately I had to fix a bunch of bugs with OpenCV in my own fork of it as well as fork darknet to fix some stuff as well.