-
Notifications
You must be signed in to change notification settings - Fork 1
Home
The aim of this project is to track specific objects using color segmentation and control the Jackal using discrete control. A PS3 Eye camera has been mounted on the Jackal that provides visual feedback control from the Jackal. A subscriber node has been developed that imports the image from an image publisher and processes them using open-cv.
Specific colors have been defined in the code that enable it and disable (masks) other colors. A radius is defined around these objects that change dynamically based on the orientation and distance of the object from the camera. For our testing, a yellow cup has been used that is bright as compared to other objects we could find (this probably wasn't the best choice since the jackal detects other jackal's and huskies). Since in an assumption it has been given that the lighting conditions would be similar to room 817 and no objects would be surrounding the Jackal, we thought it best not to change the color at the moment.
For the movement of the Jackal, a P controller has been designed for controlling the jackal in accord with the object. The input to this controller is a custom position message from the tracker code. As the object in front of the Jackal moves, the controller code calculates its offset from the previous location and published a velocity to /cmd_vel. This velocity is in the direction of the movement of the object in front of the Jackal. The controller tries to center the object within the camera's field of view. The movement attempts to maintain the same approximate distance of the Jackal from the object. The controller also includes a hysteresis which ensuring that the visual feedback results in smooth tracking of the object. This hysteresis has been applied in both the linear as well as angular direction. The motion has finally has been saturated to 0.5m/s to prevent the Jackal from going too fast.
The joystick.launch file launches the joystick routine which basically listens to the joystick messages from bluetooth. Upon pressing the circle button on the PS3 controller the tracking of the object begins whereas on pressing the X button, it stops.