Skip to content

Commit

Permalink
Updated readme, removed unused srv definition.
Browse files Browse the repository at this point in the history
  • Loading branch information
idtx314 committed Dec 9, 2017
1 parent c35abbc commit 445d75b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
24 changes: 16 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,19 @@ In total, there are three main components of this project: Color Segmentation, A

[![baxpicture](./media/demo_screen.png)](https://vimeo.com/246536038)

One launch file is included named ["baxter_sw.launch"][launch-launch1]. This should start everything. There have been some instances of the [pose-and-item](/src/pose_and_item) node crashing after startup. The suggested work-around for this is to either restart that node individually, or to operate the nodes manually.
One launch file is included named ["baxter_sw.launch"][launch-launch1]. This should start everything. There have been some instances of the [pose-and-item][src-pose] node crashing after startup. The suggested work-around for this is to either restart that node individually, or to operate the nodes manually.


##### [Scripts][src]
* The [pic_cal_sw.py](src/pic_cal_sw.py) script launches the node `pic_cal` that subscribes to Baxter's left hand camera topic `/cameras/left_hand_camera/image`. While not actually run in the launch file, this node was used to obtain clear images of the [blue][media-post2], [yellow][media-post1], and [pink][media-post3] post-it-notes that Baxter used to differentiate between the three different objects: the Keurig, cup, and K-cup.
* The [pic_cal_sw.py][src-pic] script launches the node `pic_cal` that subscribes to Baxter's left hand camera topic `/cameras/left_hand_camera/image`. While not actually run in the launch file, this node was used to obtain clear images of the [blue][media-post2], [yellow][media-post1], and [pink][media-post3] post-it-notes that Baxter used to differentiate between the three different objects: the Keurig, cup, and K-cup.

* The [table_cam_sw.py](src/table_cam_sw.py) script launches the node `table_cam` that subscribes to Baxter's left hand camera topic `/cameras/left_hand_camera/image`. It then loads the three post-it-note images from the media folder and uses histogram-based color segmentation to create three masks - one for each color. Assuming the camera has a clear view of all three post-it-notes, it finds the centroids and compares them to find their relative positions. It then publishes a String message on the `pos_items` topic listing the objects from left to right as one faces Baxter.
* The [table_cam_sw.py][src-table] script launches the node `table_cam` that subscribes to Baxter's left hand camera topic `/cameras/left_hand_camera/image`. It then loads the three post-it-note images from the media folder and uses histogram-based color segmentation to create three masks - one for each color. Assuming the camera has a clear view of all three post-it-notes, it finds the centroids and compares them to find their relative positions. It then publishes a String message on the `pos_items` topic listing the objects from left to right as one faces Baxter.

* The [starbax_sw.py](/src/starbax_sw.py) script launches the node `initial` that positions Baxter's left arm so that it's camera has a top-down view of the table where the Keurig, cup, and K-cup are located.
* The [starbax_sw.py][src-starbax] script launches the node `initial` that positions Baxter's left arm so that it's camera has a top-down view of the table where the Keurig, cup, and K-cup are located.

* The [artransforms.py][src/artransforms.py] script will launch the `ar_info` node and it will subscribe to the `ar_pose_marker` topic generated by the `ar_track_alvar package`. This script will then extract the AR tags id number, the x,y,z positions with respect to the base frame, and orientation data of each of the tags. This data is then republished on the topic `ar_pose_id` as a custom message type called `ar_tag`.
* The [artransforms.py][src-artrans] script will launch the `ar_info` node and it will subscribe to the `ar_pose_marker` topic generated by the `ar_track_alvar package`. This script will then extract the AR tags id number, the x,y,z positions with respect to the base frame, and orientation data of each of the tags. This data is then republished on the topic `ar_pose_id` as a custom message type called `ar_tag`.

* The [pose_and_item.py](/src/pose_and_item) script launches the node `pose_item` that subscribes to the `pos_items` and `ar_pose_id` topics to get the relative positions of the objects and their pose in the world. The incoming pose is of the `ar_tag` message definition. It then sorts the three poses from least to greatest using their 'y' coordinates. The pose with the smallest 'y' coordinate is then paired with the left most object as one faces Baxter, and so forth. Finally, the node publishes a new `ar_tagstr` message containing the object name and pose to the topic `pose_and_item`.
* The [pose_and_item.py][src-pose] script launches the node `pose_item` that subscribes to the `pos_items` and `ar_pose_id` topics to get the relative positions of the objects and their pose in the world. The incoming pose is of the `ar_tag` message definition. It then sorts the three poses from least to greatest using their 'y' coordinates. The pose with the smallest 'y' coordinate is then paired with the left most object as one faces Baxter, and so forth. Finally, the node publishes a new `ar_tagstr` message containing the object name and pose to the topic `pose_and_item`.

* The [movement.py][src-movem]: Will subscribe to the topic `pose_and_item` to find the x and y positions of the items. The process of picking and placing of objects is broken down into several independent tasks, this node defines each of these tasks as a separate function. The main function calls all of the movement functions in the correct order after the x and y positions of the objects. The node also calls the `open_service` and `close_service` services to open and close the Keurig lid.

Expand All @@ -55,8 +55,9 @@ One launch file is included named ["baxter_sw.launch"][launch-launch1]. This sho
* /pose_and_item: Publishes the positions of the AR tags with what item each position corresponds to

##### Messages
* ar_tag.msg: contains the id number as a uint32 and the pose as a geometry_msgs/Pose
* ar_tagstr.msg: contains contains the item label as a string and the pose as a geometry_msgs/Pose
* [ar_tag.msg][msg-tag]: contains the id number as a uint32 and the pose as a geometry_msgs/Pose
* [ar_tagstr.msg][msg-tagstr]: contains contains the item label as a string and the pose as a geometry_msgs/Pose
* [Open2.srv][srv-2]: Contains the service definition used to communicate with open_service.py and close_service.py.


##### [Launch Files][launch]
Expand All @@ -65,6 +66,10 @@ One launch file is included named ["baxter_sw.launch"][launch-launch1]. This sho


[src]:https://github.com/Laurenhut/ME495-final-project/tree/master/src
[src-pic]:https://github.com/Laurenhut/ME495-final-project/blob/master/src/pic_cal_sw.py
[src-table]:https://github.com/Laurenhut/ME495-final-project/blob/master/src/table_cam_sw.py
[src-starbax]:https://github.com/Laurenhut/ME495-final-project/blob/master/src/starbax_sw.py
[src-pose]:https://github.com/Laurenhut/ME495-final-project/blob/master/src/pose_and_item.py
[src-artrans]:https://github.com/Laurenhut/ME495-final-project/blob/master/src/artransforms.py
[src-movem]:https://github.com/Laurenhut/ME495-final-project/blob/master/src/movement.py
[src-close]:https://github.com/Laurenhut/ME495-final-project/blob/master/src/close_service.py
Expand All @@ -74,6 +79,9 @@ One launch file is included named ["baxter_sw.launch"][launch-launch1]. This sho
[src-press]:https://github.com/Laurenhut/ME495-final-project/blob/master/src/press_service.py
[src-press-ik]:https://github.com/Laurenhut/ME495-final-project/blob/8abeed0ab9085f8ded1aa93a2818832768050d51/src/press_service.py#L90

[msg-tag]:https://github.com/Laurenhut/ME495-final-project/blob/master/msg/ar_tag.msg
[msg-tagstr]:https://github.com/Laurenhut/ME495-final-project/blob/master/msg/ar_tagstr.msg

[srv-2]:https://github.com/Laurenhut/ME495-final-project/blob/master/srv/Open2.srv

[launch]:https://github.com/Laurenhut/ME495-final-project/tree/master/launch
Expand Down
3 changes: 0 additions & 3 deletions srv/Open.srv

This file was deleted.

0 comments on commit 445d75b

Please sign in to comment.