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

Dock_detection #335

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Dock_detection #335

wants to merge 1 commit into from

Conversation

saltyan007
Copy link
Contributor

Upload the program "Dock_Detection" and two template pictures

Copy link
Contributor

@kev-the-dev kev-the-dev left a 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)
Copy link
Contributor

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:
Copy link
Contributor

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)
Copy link
Contributor

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(
Copy link
Contributor

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()
Copy link
Contributor

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)
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants