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.
- Is there any wrongs in my process?
- How to deal with my problem?
- If the mess model problem could figure out, the next step is how to do?
Thanks a lot and look forward to your answer.
Post score: 1