-
Notifications
You must be signed in to change notification settings - Fork 54
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
Dock_detection #335
base: master
Are you sure you want to change the base?
Dock_detection #335
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.
Again, to finish the program you need all the things listed in my latest comment here (from a month ago):
#210
import sys | ||
|
||
# import template picture form local file | ||
imgCr = cv2.imread('/home/y21/mil_ws/src/NaviGator/perception/navigator_vision/templates/dock_shape_identification/cross.png', 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.
We need to be able to run your program too... so these files need to be in the repo
edgeCir = cv2.Canny(medianCir, 100, 200) | ||
|
||
|
||
class dock_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.
need a docstring comment describing what this program does and how to use it
# check if successfully subscribed the topic | ||
cv_image = self.bridge.imgmsg_to_cv2(data, "bgr8") | ||
except CvBridgeError as e: | ||
print(e) |
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.
if there was a error, you need to exit the function
break | ||
|
||
# publish the message out | ||
pub = rospy.Publisher( |
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.
make this in your class constructor. VERY slow to make this every callback
pub.publish(shape) | ||
rospy.loginfo(color) | ||
pub.publish(color) | ||
rate.sleep() |
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 point of this?
|
||
def main(args): | ||
ic = dock_detection() | ||
rospy.init_node('dock_detection', anonymous=True) |
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.
init_node needs to go before any subscribers/publishers
Upload the program "Dock_Detection" and two template pictures