Sunday, September 22, 2019

Ros services with Iri Wam robot

Move the Iri Wam bot robotic arm in a trajectory


Iri-Wam is a software package developed by  Institut de Robòtica i Informàtica Industrial robotics laboratory. From roswiki  you can directly install the iri_wam package in your ros framework.

        Links: https://www.iri.upc.edu/                
                                                          http://wiki.ros.org/iri_wam       


To move the Iri_Wam robotic arm in a trajectory, we need to create a service which provides the trajectory motion. When you launch your gazebo world, there will also be some other modules like  "kinet_camera, bowls, etc along with the iri_wam bot. My aim today is to move the robotic arm and pick the food and place it in the bowl. So here am using a service called '/execute_trajectory' service to move the robotic arm.
          When I launch the client code, the service will also get activated as I included the  path for service launch file inside the client launch file. Here am discussing only on how to create a client file which when called should make the bot to move for the already existing service.A sample python code and its launch file links are provided below:
                                       https://github.com/sidharthramabhadran/iri_wam-/blob/master/launch%20file 

In the above code, I imported rospkg also to use " get_path" function to add the get_foodtxt message to our code. We can launch the file by the command " roslaunch <package_name>  <python_file_name>".Now we can see the movement of the robotic arm.

                              https://www.youtube.com/watch?v=YwtmiqJUiL4


Friday, September 20, 2019

ROS Services with Sphero BB-8 robot

Move BB-8 in a circle like trajectory

First of all, you need to create a service which will make the bb8 robot to move in a circular motion when we call the service. For that, you need to create a server code which will provide the service. The code can be written in any language. Here I used the python language to create the server. The sample server file link has been provided below.

Now you can run the server in a terminal. Make sure that your rosmaster is running behind while you run your server code.Now, what happened is , we created a server which is ready to serve whenever we call the server. We can now call the server using either a rosservice call or by creating a client file. But here am creating a client file which calls the service. The sample client file link has been provided below.

Now we can run the codes, for that you either create a launch file to launch the files or you can either run directly on the terminal using "rosrun package_name python_file".So now when you execute the above codes you can see the bot moving in a circle like trajectory

                              https://www.youtube.com/watch?v=KW-Hfcohdc0