How to write a custom control plugin for Gazebo-Ros using Python ?

asked 2019-02-20 09:09:37 -0600

microbot gravatar image

Helllo, I have been trying to write a custom control plugin for gazebo using python interpreter. I want to use ros to fetch the joint states and publish joint commands for my robot in the gazebo. I have been searching for what kind of packages do I need to import in my python script file in order to read the joint states from gazebo model. Can you please help me pointing me out in the right direction? All the tutorials I have been searching are for the plugin in C++. If available can you please give me any link of sample custom control plugin in python. Also I have come across Osrf_msgs package , I am not sure about what that package comprises of. Can you please help me with this. Thank you.

edit retag flag offensive close merge delete


pmuthu2s gravatar imagepmuthu2s ( 2019-02-20 09:14:41 -0600 )edit

Yea I have come across that, although I could not understand what Osrf_msg package is and then the scope of JointState() function whether this function gives the joint states of all the joints together or how the function is supposed to be used.

microbot gravatar imagemicrobot ( 2019-02-20 09:32:31 -0600 )edit

Also the whole tutorial is a bit raw when trying to understand what the code is supposed to do , like what he tried to do with having the Kp, Ki and Kd gain values and etc, if you could give me a brief explanation, it would be very much appreciated. Thanks in advance.

microbot gravatar imagemicrobot ( 2019-02-20 09:34:14 -0600 )edit

I guess joint states are from sensor msgs check this link They will provide all the joint states.

pmuthu2s gravatar imagepmuthu2s ( 2019-02-20 09:40:15 -0600 )edit
pmuthu2s gravatar imagepmuthu2s ( 2019-02-20 09:41:31 -0600 )edit