Just a simple template node receiving an image and doing something. Links to OpenCV and ROS wrapped. EeasyRobotic.
Check your webcam encodings (yuyv,mjpeg,...) and set them accordingly at file launch/usb_camera.launch
There are the following functions:
- process()(where it processes the main code) -> it has the circle detection algorithm and also computes the direction of the circle, referenced to the camera.
- publishImage()(Image publisher) -> it publishes the image with its detected circles, its squares and its directors.
- publishMarker()(Marker publisher) -> it publishes the marker to RVIZ.
- getMarker()(NEW - Director publisher) -> it publishes the director vector of the circle by a geometry_msgs::vector3.
It obtains the following outputs:
- /usb_cam/image_raw -> original image
- /ros_img_processor/image_out -> image with circles with its boxes and also a simple plotting of the director.
- RVIZ: representation of the direction in rviz axis.
- Add this repository in a catkin_workspace/src
- in catkin_workspace source make catkin_make --only-pkg-with-deps ros_img_processor
- Run launch file .ros_img_processor ros_img_processor.launch
- In a new terminal run rostopic echo /ros_img_processor/direction