osrf / gzweb

Web client for Gazebo classic simulation
http://gazebosim.org/gzweb
Other
62 stars 60 forks source link

Creating local model of turtlebot_description package #45

Open osrf-migration opened 9 years ago

osrf-migration commented 9 years ago

Original report (archived issue) by Yuki Furuta (Bitbucket: furushchev).


Hi, all!

I'm trying to run the tutorial of turtulebot_simulator ( http://wiki.ros.org/turtlebot_simulator ) using gzweb.

I could run the launch roslaunch turtlebot_gazebo turtlebot_empty_world.launch, and I could see a turtlebot on gazebo sim.

Then I executed ./start_gzweb.sh, and could see the ground of gazebo world, but no turtlebot has been found.

I know that in order to use custom model on gzweb, local model has to be deployed. So, I executed some commands as follow:

export GAZEBO_MODEL_PATH=`rospack find turtlebot_description`/..:$GAZEBO_MODEL_PATH
cd /path/to/gzweb
./deploy.sh -m local

After this, I checked that turtlebot_description directory has been copied to http/client/assets folder.

How should I do next?

osrf-migration commented 9 years ago

Original comment by Yuki Furuta (Bitbucket: furushchev).


osrf-migration commented 9 years ago

Original comment by Ian Chen (Bitbucket: Ian Chen, GitHub: iche033).


The problem is most likely that turtlebot_description is in urdf format. Currently gzweb supports sdf only. What are the files in the turtlebot_description folder in assets?

Loading of models in gzweb is specific to gazebo model dir structure at the moment, and supports collada files only.

osrf-migration commented 9 years ago

Original comment by Ian Chen (Bitbucket: Ian Chen, GitHub: iche033).


We have this turtlebot_description model working in gzweb a while back, have not tested it recently though.

osrf-migration commented 9 years ago

Original comment by Kei Okada (Bitbucket: k-okada).


@furushchev, did you use spawn_model ? to publish robot model in gazebo from urdf? if so, it uses absolute path from package:// so you have to convert to model://, see https://github.com/ros-simulation/gazebo_ros_pkgs/pull/288 or use something like

  <!-- push robot_description to factory and spawn robot in gazebo -->
  <node name="urdf_spawner" pkg="gazebo_ros" type="spawn_model"
        args="-z 1.0 -unpause -urdf -model robot -file /tmp/robot.gazebo.urdf -package_to_model" respawn="false" output="screen">
    <param name="dummy_to_generate_gazebo_urdf_file"
           command="rosrun xacro xacro.py -o /tmp/robot.gazebo.urdf $(arg model)" />
    <param name="dummy_to_convert_package_to_model"
           command="sed -i s@package://@model://@g /tmp/robot.gazebo.urdf" />
  </node>
osrf-migration commented 9 years ago

Original comment by Harmish Khambhaita (Bitbucket: harmishhk).


i am having similar problem for rendering baxter robot in gzweb. (as explained in this tutorial)

i cloned baxter_common from here, and added a model.config file inside baxter_description.

after executing following,

#!bash

source /usr/share/gazebo-5.0/setup.sh
export GAZEBO_MODEL_PATH=`rospack find baxter_common`:$GAZEBO_MODEL_PATH
cd /path/to/gzweb
./deploy.sh -m local

i get whole baxter_description directory copied to /path/to/gzweb/http/client/assets

the model renders just fine in gzclient but showing only few parts of the baxter robot in gzweb, as shown in the image belwo

gzweb.jpeg

osrf-migration commented 9 years ago

Original comment by Ricardo Tellez (Bitbucket: TheConstruct).


Hey Harmish, it looks like your problem is exactly the same as the Yuki. Looking inside the baxter_description at the link you provided, I see that the urdf/baxter.urdf contains the tag package:// when defining the mesh filenames.

If you want to load the model into the gzweb, it should say model:// For that, you have two options: either you change manually package by model, or you use the option -package_to_model with the urdf_spawner (as indicated by Kei Okada).

Luck!

osrf-migration commented 7 years ago

Original comment by ahmed (Bitbucket: ahmedkhrifi).


i have a model with extension urdf,then i need to import this model to GazeboWeb!!