ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

Why import my own robot model goes to mess?

asked 2011-08-03 21:55:52 -0500

shenhaobin gravatar image

updated 2014-01-28 17:10:09 -0500

ngrennan gravatar image

I want to create my own robot model and simulate that with C or C++ code through gazebo. First I create my own robot model by Solidwork software and export the model to xml and STl files by using the plug-in SimMechanics Link. Then I transformed urdf fil from the xml file by the simmechanics_to_urdf packet. my code likes below:

rosrun simmechanics_to_urdf convert.py jixiebi.xml xml > jixiebi.urdf

After that, I copy all of the STL files to the catalog of /simulator_gazebo/gazebo_worlds/Media/models. Finally,I run the below code

rosrun gazebo spawn_model -file `pwd`/jixiebi.urdf -urdf -z 1 -model my_jixiebi

and now I can see my model. But the model goes to mess. I guess it's the coordinate error, but I don't know how to deal with. I know the urdf has origin tag but I find it's very difficult to fix all link's and joint's coordinate correctly. What's worse, my model has hundreds of links and joints. So, here is my questions.

  1. Is there any wrongs in my process?
  2. How to deal with my problem?
  3. If the mess model problem could figure out, the next step is how to do?

Thanks a lot and look forward to your answer.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
4

answered 2011-08-04 01:38:42 -0500

David Lu gravatar image

simmechanics_to_urdf is desiged to save a lot of work when creating a URDF file for a complex robot, but it does not do everything. Definitely check out this tutorial. Also, before moving into gazebo, I would ensure that your model looks right and moves correctly in rviz first.

edit flag offensive delete link more

Comments

how to import my model to the rviz? And if the model would not look right in rviz, how to correct it?
shenhaobin gravatar image shenhaobin  ( 2011-08-05 13:25:43 -0500 )edit
It's all explained in the tutorial linked by David. If you have a question concerning a specific step, ask.
Martin Günther gravatar image Martin Günther  ( 2011-08-05 22:04:30 -0500 )edit

Question Tools

Stats

Asked: 2011-08-03 21:55:52 -0500

Seen: 569 times

Last updated: Aug 05 '11