user5146563
user5146563

Reputation:

how do i load plugin from sdf model in ros

Similarly like i can put a plugin in urdf file and than when i launch that urdf in gazebo i can control that robot, isn't their any way how i can contol the robot model. I tried to use this line in my launch file but its not working:<param name="robot_description" textfile="$(find <my_robot>)/model.sdf"/>

So is their any way how i can use the plugin from sdf robot to my gazebo ros control package or robot_description src file similarly like i did with urdf file. Like when i launchdd the urdf file with plugins in them, i can communicate with the robot from my plugin file than use ros control. Similarly i loaded the sdf robot in my world file than when i launchd it from my roslaunch file the plugin is not loaded. Why i want to do this was, because so many robot models like r2, kuka and others where present in sdf format so i want to communicate them from my ros package. I am using ros indigo and gazebo 7.4 for robot simulation. Why is this happening that when i spawn a urdf robot in gazebo i'm able to communicate it through ros but not when i spawn a sdf robot?

Upvotes: 0

Views: 1552

Answers (1)

ikudyk
ikudyk

Reputation: 94

Documentation reads:

Under the hood, Gazebo will then convert the URDF to SDF automatically.

Thus, I suggest the problem is in the way you run your sdf, nothing to do with sdf or urdf. Have you tried running the sdf directly (like rosrun gazebo_ros gazebo /path/to/your/sdf)? Not sure about indigo, it helped with kinetic.

Upvotes: 0

Related Questions