-
Notifications
You must be signed in to change notification settings - Fork 8
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
Added the marker detection to the image, pose and position #3
base: master
Are you sure you want to change the base?
Added the marker detection to the image, pose and position #3
Conversation
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.
Hi Nehil,
thanks for the PR! The pose
topic and drawing the corners can be nice features indeed.
@@ -48,6 +51,9 @@ void CharucoBoardDetector::onImageImpl(const sensor_msgs::ImageConstPtr &img) { | |||
boardDetected = cv::aruco::estimatePoseCharucoBoard( | |||
charucoCorners, charucoIds, board, cameraParameters->cameraMatrix, | |||
cameraParameters->distorsionCoeff, rvec, tvec); | |||
|
|||
cv::aruco::drawDetectedCornersCharuco(image->image, charucoCorners, charucoIds, cv::Scalar(255, 0, 0)); |
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.
Can you move this next to the drawAxis
, within the if
?
@@ -6,6 +6,7 @@ | |||
#include <ros/ros.h> | |||
#include <sensor_msgs/CameraInfo.h> | |||
#include <sensor_msgs/Image.h> | |||
#include <visualization_msgs/Marker.h> |
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.
#include <visualization_msgs/Marker.h> |
This looks unnecessary
@@ -1,7 +1,7 @@ | |||
cmake_minimum_required(VERSION 2.8.12) | |||
project(easy_aruco) | |||
|
|||
find_package(catkin REQUIRED COMPONENTS sensor_msgs cv_bridge tf2_ros tf2_geometry_msgs) | |||
find_package(catkin REQUIRED COMPONENTS sensor_msgs cv_bridge tf2_ros tf2_geometry_msgs visualization_msgs) |
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.
find_package(catkin REQUIRED COMPONENTS sensor_msgs cv_bridge tf2_ros tf2_geometry_msgs visualization_msgs) | |
find_package(catkin REQUIRED COMPONENTS sensor_msgs cv_bridge tf2_ros tf2_geometry_msgs) |
This looks unnecessary
@@ -15,6 +15,7 @@ | |||
<depend>sensor_msgs</depend> | |||
<depend>tf2_ros</depend> | |||
<depend>tf2_geometry_msgs</depend> | |||
<depend>visualization_msgs</depend> |
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.
<depend>visualization_msgs</depend> |
This looks unnecessary
@@ -68,6 +74,21 @@ void CharucoBoardDetector::onImageImpl(const sensor_msgs::ImageConstPtr &img) { | |||
cameraToBoardStamped.transform = tf2::toMsg(cameraToBoard); | |||
|
|||
broadcaster->sendTransform(cameraToBoardStamped); | |||
|
|||
geometry_msgs::Vector3Stamped positionMsg; |
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.
What is the use case for the position
publisher? I think the user can listen to the pose
and just take the translation part
Hey Marco,
while I was using the repo, I needed to visualize the pose, position or the marker and also I visualized it on the image published. I thought it would be nice to add this into the code, this way people can directly subscribe to the topics from rviz. What do you think?