[ ![People's Blog • First Pictures of the Eclipse ! !
!](//thepeoplescube.com/red/download/file.php?id=57243&sid=3721c68912ad1a7b63f4cf1eafba9b41)
](////satire3490.rssing.com/chan-77006292/article253.html#c77006292a253i838655542)


[ ](javascript:; "Like") 0


[ ](javascript:; "Share Article") [
](//www.rssing.com/contact.php?r=o6&u=%2F%2Fgazebo214.rssing.com%2Fchan-57893035%2Flatest-
article6-live.php "Article Support")


[ _≫_ Next: URI paths to packages in the SDF model file?
](//gazebo214.rssing.com/chan-57893035/latest.php#c57893035a6928 "Next
Article")


#  [ Failed to load gz-sim-diff-drive-system
](//gazebo214.rssing.com/chan-57893035/latest-article18-live.php)


    02496
    02497 };
    02498
    02500 // Main function
    [02501](gazeboros_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627) int [main](gazeboros_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627)(int argc, char **argv)
    02502 {
    02503
    02504   // start a gazebo ros node
    02505   ros::init(argc,argv,"gazebo",[ros::init_options::NoSigintHandler](../../../api/roscpp/html/namespaceros_1_1init__options.html#adab51ffb9c4de34737c4213d16d23db7a3c716dc6e0e90d23222f50487da4453f));//|ros::init_options::AnonymousName);
    02506
    02507   // force a cpu affinity for CPU 0, this slow down sim by about 4X
    02508   // cpu_set_t cpuSet;
    02509   // CPU_ZERO(&cpuSet);
    02510   // CPU_SET(0, &cpuSet);
    02511   // sched_setaffinity( 0, sizeof(cpuSet), &cpuSet);
    02512
    02513   //Application Setup
    02514   if ([ParseArgs](gazeboros_8cpp.html#ad9679efc026cf00079540edae2daf96e)(argc, argv) != 0)
    02515   {
    02516     ros::shutdown();
    02517     return -1;
    02518   }
    02519
    02520   [PrintVersion](gazeboros_8cpp.html#a1fae5968f70747445d63f63065fb7ef3)();
    02521
    02522   if (signal(SIGINT, [SignalHandler](gazeboros_8cpp.html#a7972e8125628180f0e4d04a8f805ced6)) == SIG_ERR)
    02523   {
    02524     std::cerr << "signal(2) failed while setting up for SIGINT" << std::endl;
    02525     ros::shutdown();
    02526     return -1;
    02527   }
    02528
    02529   gazebo::Simulator::Instance()->SetCreateOgreLog( [optOgreLog](gazeboros_8cpp.html#a511ffb65b36a4472dbfdbd6e3139f032) );
    02530   gazebo::Simulator::Instance()->SetGuiEnabled( [optGuiEnabled](gazeboros_8cpp.html#ab8c4575115b7da32322fd180490d291d) );
    02531   gazebo::Simulator::Instance()->SetRenderEngineEnabled( [optRenderEngineEnabled](gazeboros_8cpp.html#a71c88173f8bab8627a31df3b34499bb9) );
    02532
    02533   // setting Gazebo Path/Resources Configurations
    02534   //   GAZEBO_RESOURCE_PATH, GAZEBO_PLUGIN_PATH and OGRE_RESOURCE_PATH for
    02535   //   GazeboConfig::gazeboPaths, GazeboConfig::pluginPaths and GazeboConfig::ogrePaths
    02536   // by adding paths to GazeboConfig based on ros::package


I didn't read all the previous comments, but -J works for me on current
gazebo9 + melodic. This is my spawner:


[ Browse all 6955 ](//gazebo214.rssing.com/chan-57893035/index-page1.html) [
Browse latest ](//gazebo214.rssing.com/chan-57893035/index-latest.php) [ View
live ](//gazebo214.rssing.com/chan-57893035/latest-article1-live.php)


    02412       /*                                                             */
    02413       /***************************************************************/
    02414       this->[pub_clock_](classGazeboROSNode.html#aed02a543ac7934fc64049963e08fe30f).[publish](../../../api/roscpp/html/classros_1_1Publisher.html#af4e0009d55b5a7729fd71c3ffdf502cd)(ros_time_);
    02415     }
    02416
    [02419](classGazeboROSNode.html#abdcedd88754decfd73b04c1e9d7f5023)     void [publishLinkStates](classGazeboROSNode.html#abdcedd88754decfd73b04c1e9d7f5023)()
    02420     {
    02421       [gazebo_msgs::LinkStates](../../gazebo_msgs/html/structgazebo__msgs_1_1LinkStates__.html) link_states;
    02422       // fill link_states
    02423       const std::vector<gazebo::Model*> models = gazebo::World::Instance()->GetModels();
    02424       for (std::vector<gazebo::Model*>::const_iterator miter = models.begin(); miter != models.end(); miter++)
    02425       {
    02426         const std::vector< gazebo::Entity* > entities = (*miter)->GetChildren();
    02427         for (std::vector< gazebo::Entity* >::const_iterator eiter = entities.begin();eiter!=entities.end();eiter++)
    02428         {
    02429           gazebo::Body* body = dynamic_cast<gazebo::Body*>(*eiter);
    02430           if (body)
    02431           {
    02432             link_states.[name](../../gazebo_msgs/html/structgazebo__msgs_1_1LinkStates__.html#a2021ec7cffcc1905c069c01c8ea91db4).push_back(body->GetCompleteScopedName());
    02433             [geometry_msgs::Pose](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Pose__.html) pose;
    02434             gazebo::Pose3d  body_pose = body->GetWorldPose(); // - this->myBody->GetCoMPose();
    02435             gazebo::Vector3 pos = body_pose.pos;
    02436             gazebo::Quatern rot = body_pose.rot;
    02437             pose.[position](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Pose__.html#a27067d1772d85a856b0e4ed4690a80b4).[x](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Point__.html#acd9420e6916084b2a9c09019bfda1708) = pos.x;
    02438             pose.[position](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Pose__.html#a27067d1772d85a856b0e4ed4690a80b4).[y](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Point__.html#a46a84ff5a3e5817ab5693abda66fccb0) = pos.y;
    02439             pose.[position](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Pose__.html#a27067d1772d85a856b0e4ed4690a80b4).[z](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Point__.html#a061f0093e927a95998f35ceceb5cebda) = pos.z;
    02440             pose.[orientation](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Pose__.html#af8c1d34a44a7628ea9c3e571339f5a28).[w](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Quaternion__.html#a440791d268a65607ecbac21e0ed153cf) = rot.u;
    02441             pose.[orientation](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Pose__.html#af8c1d34a44a7628ea9c3e571339f5a28).[x](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Quaternion__.html#a11f3b4e2df587ce516fd2a8140c1c7c5) = rot.x;
    02442             pose.[orientation](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Pose__.html#af8c1d34a44a7628ea9c3e571339f5a28).[y](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Quaternion__.html#a601c978178311ce3a618afb38c0b6b98) = rot.y;
    02443             pose.[orientation](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Pose__.html#af8c1d34a44a7628ea9c3e571339f5a28).[z](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Quaternion__.html#ae2caceb9fc4b2fd01acd8419aa7ebc2e) = rot.z;
    02444             link_states.[pose](../../gazebo_msgs/html/structgazebo__msgs_1_1LinkStates__.html#ac4a273bbbd38b32c7df56006efc450a1).push_back(pose);
    02445             gazebo::Vector3 linear_vel  = body->GetWorldLinearVel();
    02446             gazebo::Vector3 angular_vel = body->GetWorldAngularVel();
    02447             [geometry_msgs::Twist](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Twist__.html) twist;
    02448             twist.[linear](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Twist__.html#a394500332ac20028528c37103e1bf8e5).[x](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Vector3__.html#abf9dabaf651196aee50fd14bf3b643be) = linear_vel.x;
    02449             twist.[linear](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Twist__.html#a394500332ac20028528c37103e1bf8e5).[y](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Vector3__.html#aaea58ad929c43960a06f728d97132404) = linear_vel.y;
    02450             twist.[linear](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Twist__.html#a394500332ac20028528c37103e1bf8e5).[z](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Vector3__.html#a4cde719326e6c3688ab50b51ab4708b1) = linear_vel.z;
    02451             twist.[angular](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Twist__.html#aa0cb518e509179290aa793228ef01f6b).[x](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Vector3__.html#abf9dabaf651196aee50fd14bf3b643be) = angular_vel.x;
    02452             twist.[angular](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Twist__.html#aa0cb518e509179290aa793228ef01f6b).[y](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Vector3__.html#aaea58ad929c43960a06f728d97132404) = angular_vel.y;
    02453             twist.[angular](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Twist__.html#aa0cb518e509179290aa793228ef01f6b).[z](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Vector3__.html#a4cde719326e6c3688ab50b51ab4708b1) = angular_vel.z;


It seemes to work (most of the time) for "small" models, e.g. just a
manipulator (e.g. Univeral UR5).
However, with a more complex robot like our rob@work (where we have a single
top-level launch file that takes care of everything like upload parameters,
start gazebo, spawn_model (base, manipulator, sensors), start_controllers and
other stuff), the initial config is not considered correctly.


###  [ People's Blog • Germany Bans the Number 44
](////political6769.rssing.com/chan-78425830/article66.html#c78425830a66i1994484930)


[ ](javascript:;) Switch Editions?
[ Cancel ](javascript:;)


Clear


The '${prefix}` is something that new users might not immediately know about
either, and necessary here.


[ ![@mintar](https://avatars.githubusercontent.com/u/320188?s=80&v=4)
](/mintar)


Cancel  Submit feedback


**[ m-talha ](/m-talha) ** commented  Aug 29, 2019


###  [ Za Pakhtoon Yum: A mind-altering foray into Pukhtun life and culture
](////drama1031.rssing.com/chan-27446141/article21.html#c27446141a21i856785604)


![Calgary Hells Angels implicated in another
fraud](//2.bp.blogspot.com/-qpKtSMmZQDE/VDeynZXmedI/AAAAAAAAV04/yx0T_VyHhsc/s320/IMG_60691061533681.jpeg)


[ ](javascript:; "Ouch") 0


Sorry, something went wrong.


[ _≪_ Previous: URI paths to packages in the SDF model file?
](//gazebo214.rssing.com/chan-57893035/latest.php#c57893035a6928 "Previous
Article")


[ _≪_ Previous: Gazebo garden : Plugin for FOV distortion model
](//gazebo214.rssing.com/chan-57893035/latest.php#c57893035a6947 "Previous
Article")


[ ![19 Reader-Favourite March Purchases — From Steals To
Splurges](//www.refinery29.com/images/11700583.png?auto=webp&width=600&height=600&quality=85&crop=1:1)
](////refinery1042.rssing.com/chan-72297680/article18978.html#c72297680a18978i36572736)


**ROS Service Call Spawn Method**


**[ dpsolomon ](/dpsolomon) ** commented  Aug 8, 2014


**[ anubhav1772 ](/anubhav1772) ** commented  May 24, 2020


####  Environment Variable


Copy link


[ _≪_ Previous: How to simulate a "Vaccum" or a suction action?
](//gazebo214.rssing.com/chan-57893035/latest.php#c57893035a6941 "Previous
Article")


[
![@davetcoleman](https://avatars.githubusercontent.com/u/561060?s=80&u=200346d5f870b7a99e0c188d7bb10b41f3635b84&v=4)
](/davetcoleman)


[ ](javascript:; "Share Article") [
](//www.rssing.com/contact.php?r=o6&u=%2F%2Fgazebo214.rssing.com%2Fchan-57893035%2Flatest-
article11-live.php "Article Support")


#  [ Gazebo allows one model to be inserted and then it freezes
](//gazebo214.rssing.com/chan-57893035/latest-article6-live.php)


An typical path might be something like ` /usr/local/share/gazebo-1.9 ` . Add
` /worlds ` to the end of the path and you should have the directory
containing the world files Gazebo uses, including the ` mud.world ` file.


**[ corot ](/corot) ** commented  Jan 12, 2021


[ _≫_ Next: How to access contact Information form via the
EntityComponentManager?
](//gazebo214.rssing.com/chan-57893035/latest.php#c57893035a6924 "Next
Article")


> Any idea how to make sure it just jumps to the new configured initial pose
> instead of "moving" to the new initial pose? I've been monitoring this
> problem for many years now and finally we have something closer to a
> temporary solution.


#  [ Contact Sensor Plugin does not Provide all information
](//gazebo214.rssing.com/chan-57893035/latest-article1-live.php)


[ ↂ
](////electro404.rssing.com/chan-13553321/article958.html#c13553321a958i2063621701
"THOMSON TX8O7EU CRT TV - POWER-AUDIO-VIDEO&HORIZONTAL OUTPUT - SCHEMATIC")


You should now have a URDF file named ` baxter.urdf ` located in a within
baxter_description/urdf/, and you can run:


    * [ Enterprise ](/enterprise)
    * [ Teams ](/team)
    * [ Startups ](/enterprise/startups)
    * [ Education  ](https://education.github.com)


Notice in ` mud_world.launch ` a simple jointed mechanism is launched. The
launch file for ` mud_world.launch ` contains the following:


Sorry, something went wrong.


[ _≪_ Previous: How to get colliding entities with gpu_lidar sensor (ray)
](//gazebo214.rssing.com/chan-57893035/latest.php#c57893035a6949 "Previous
Article")


**[ davetcoleman ](/davetcoleman) ** commented  Jul 30, 2013


#  Using roslaunch


[ @hsu ](https://github.com/hsu)

---

The text was updated successfully, but these errors were encountered:


#  [ How to communicate Gazebo in Ubuntu with ROS Melodic and Unity 3d in
Windows ](//gazebo214.rssing.com/chan-57893035/latest-article13-live.php)


Copy link


You can learn more about world files in the [ Build A World
](/tutorials?cat=build_world) tutorial.


[
![@davetcoleman](https://avatars.githubusercontent.com/u/561060?s=40&u=200346d5f870b7a99e0c188d7bb10b41f3635b84&v=4)
](/davetcoleman) [ davetcoleman ](/davetcoleman) mentioned this issue  Aug 13,
2013


  * [ //publio48688.rssing.com/chan-48034318/article2.html ](//publio48688.rssing.com/chan-48034318/article2.html)
  * [ //jackslbs1.rssing.com/chan-72890905/index-page1.html ](//jackslbs1.rssing.com/chan-72890905/index-page1.html)
  * [ //publio48689.rssing.com/chan-48034334/article5.html ](//publio48689.rssing.com/chan-48034334/article5.html)
  * [ //teach3147.rssing.com/chan-13678351/index-latest.php ](//teach3147.rssing.com/chan-13678351/index-latest.php)
  * [ //harpalyce73.rssing.com/chan-13677696/index-page1.html ](//harpalyce73.rssing.com/chan-13677696/index-page1.html)
  * [ //genou46.rssing.com/chan-31394312/index-latest.php ](//genou46.rssing.com/chan-31394312/index-latest.php)
  * [ //amphitheatrical72.rssing.com/chan-31394281/index-page1.html ](//amphitheatrical72.rssing.com/chan-31394281/index-page1.html)
  * [ //newsbiscuit1638.rssing.com/chan-31394371/article4.html ](//newsbiscuit1638.rssing.com/chan-31394371/article4.html)
  * [ //fanseite105.rssing.com/chan-31394071/article3.html ](//fanseite105.rssing.com/chan-31394071/article3.html)
  * [ //wunderland231.rssing.com/chan-21124254/index-latest.php ](//wunderland231.rssing.com/chan-21124254/index-latest.php)
  * [ //graphics4780.rssing.com/chan-57586014/index-latest.php ](//graphics4780.rssing.com/chan-57586014/index-latest.php)
  * [ //makeba130.rssing.com/chan-21123925/article2.html ](//makeba130.rssing.com/chan-21123925/article2.html)
  * [ //paginas368.rssing.com/chan-13677712/index-page1.html ](//paginas368.rssing.com/chan-13677712/index-page1.html)
  * [ //bestof99.rssing.com/chan-1196027/article6.html ](//bestof99.rssing.com/chan-1196027/article6.html)
  * [ //clayzmama690.rssing.com/chan-48035399/article2.html ](//clayzmama690.rssing.com/chan-48035399/article2.html)
  * [ //creighton432.rssing.com/chan-57585419/article2.html ](//creighton432.rssing.com/chan-57585419/article2.html)
  * [ //memolition80.rssing.com/chan-57585085/index-page1.html ](//memolition80.rssing.com/chan-57585085/index-page1.html)
  * [ //vanilladesign27.rssing.com/chan-13677810/index-latest.php ](//vanilladesign27.rssing.com/chan-13677810/index-latest.php)
  * [ //billancourt170.rssing.com/chan-57585562/index-page1.html ](//billancourt170.rssing.com/chan-57585562/index-page1.html)
  * [ //modern5023.rssing.com/chan-31394499/index-page1.html ](//modern5023.rssing.com/chan-31394499/index-page1.html)


Contributor


> The second method allows you to include your robot within the ` .world `
> file, which seems cleaner and more convenient but requires you to add your
> robot to the Gazebo model database by setting an environment variable.


[ ](//www.rssing.com/index.php?zw=2123 "Home") [ $ ](javascript:; "MoMoney")


![Noise Industries FxFactory Pro 3.0.2 \[MAC\]](//www.techwench.com/wp-
content/uploads/2010/11/Noise-Industries-FxFactory-Pro-2.jpg)


[ _≪_ Previous: help for installing lidar on a drone
](//gazebo214.rssing.com/chan-57893035/latest.php#c57893035a6942 "Previous
Article")


[ ](javascript:; "Like") 0


rosrun gazebo_ros spawn_model -sdf -model p100 -file ~/.gazebo/models/double_pendulum_with_base/model.sdf -x 2 -J upper_joint -1.5


You should then see something similar to:


For


Collaborator  Author


* 👍  3 reactions


Sorry, something went wrong.


[
![@anshulpaigwar](https://avatars.githubusercontent.com/u/6399885?s=80&u=4d67f9d0f1f8be52a1989f831716cf4fde3cbbba&v=4)
](/anshulpaigwar)


> Enable gazebo state log recording


[ ](javascript:; "Ouch") 0


[ Search syntax tips ](https://docs.github.com/search-github/github-code-
search/understanding-github-code-search-syntax)


**Model Database Method**


####  Viewing In Gazebo - Manually


[ RSSing>> ](//www.rssing.com/index.php) [ Latest
](//www.rssing.com/index.php?l=l) [ Popular ](//www.rssing.com/index.php?l=p)
[ Top Rated ](//www.rssing.com/index.php?l=r) [ Trending
](//www.rssing.com/index.php?l=t)


July 25, 2018, 1:53 pm


what version of gazebo are you using? Could be related to this bug below?


[ ](javascript:; "Share Article") [
](//www.rssing.com/contact.php?r=o6&u=%2F%2Fgazebo214.rssing.com%2Fchan-57893035%2Flatest-
article29-live.php "Article Support")


[ ![@Nurgak](https://avatars.githubusercontent.com/u/1785126?s=80&v=4)
](/Nurgak)


  * [ File List  ](files.html)
  * [ File Members  ](globals.html)


[ ](javascript:; "Like") 0


seems to be working for me using the [ double pendulum example
](http://gazebosim.org/models/double_pendulum_with_base/) :


Similar to that but ONLY the robot for now.

---

All reactions


` [ temporary hack to **fix** the -J joint position option (issue ](/ros-
simulation/gazebo_ros_pkgs/commit/99b9dc598413ab37f6d5f7e67b005f195d88ccdc
"temporary hack to **fix** the -J joint position option \(issue #93\),
sleeping for 1 second to avoid race condition. this branch should only be used
for debugging, merge only as a last resort.") [ #93 ](https://github.com/ros-
simulation/gazebo_ros_pkgs/issues/93) [ ), s… ](/ros-
simulation/gazebo_ros_pkgs/commit/99b9dc598413ab37f6d5f7e67b005f195d88ccdc
"temporary hack to **fix** the -J joint position option \(issue #93\),
sleeping for 1 second to avoid race condition. this branch should only be used
for debugging, merge only as a last resort.") ` …


Copy link


March 28, 2014, 10:18 am


[
![@josephcoombe](https://avatars.githubusercontent.com/u/12258096?s=80&u=7183cea6707fa9fd5234c2d771d7a5db287ce4a4&v=4)
](/josephcoombe)


[
![@davetcoleman](https://avatars.githubusercontent.com/u/561060?s=80&u=200346d5f870b7a99e0c188d7bb10b41f3635b84&v=4)
](/davetcoleman)


[ Back ](/tutorials?cat=install)


[ ](javascript:; "Share Article") [
](//www.rssing.com/contact.php?r=o6&u=%2F%2Fgazebo214.rssing.com%2Fchan-57893035%2Flatest-
article3-live.php "Article Support")


For now, we will assume your catkin workspace is named ` catkin_ws ` , though
you can name this to whatever you want. Thus, your catkin workspace might be
located on your computer at something like:


August 10, 2023, 2:44 pm


I wonder if it's because [ Model::jointController
](https://bitbucket.org/osrf/gazebo/src/8efd18f7a322cb5945634f060197de24a65ac1ed/gazebo/physics/Model.cc?at=default#cl-272)
hasn't been initialized yet when this function is called.

---

All reactions


    00940           // convert to relative pose
    00941           gazebo::Pose3d frame_pose = frame->GetWorldPose();
    00942           model_pos = model_pos - frame_pose.pos;
    00943           model_pos = frame_pose.rot.RotateVectorReverse(model_pos);
    00944           model_rot *= frame_pose.rot.GetInverse();
    00945
    00946           // convert to relative rates
    00947           gazebo::Vector3 frame_vpos = frame->GetWorldLinearVel(); // get velocity in gazebo frame
    00948           gazebo::Vector3 frame_veul = frame->GetWorldAngularVel(); // get velocity in gazebo frame
    00949           model_linear_vel = frame_pose.rot.RotateVector(model_linear_vel - frame_vpos);
    00950           model_angular_vel = frame_pose.rot.RotateVector(model_angular_vel - frame_veul);
    00951         }
    00953         else if (req.[relative_entity_name](../../gazebo_msgs/html/structgazebo__msgs_1_1GetModelStateRequest__.html#a4b15abcdd6f57dd69eaa959f25642509) == "" || req.[relative_entity_name](../../gazebo_msgs/html/structgazebo__msgs_1_1GetModelStateRequest__.html#a4b15abcdd6f57dd69eaa959f25642509) == "world" || req.[relative_entity_name](../../gazebo_msgs/html/structgazebo__msgs_1_1GetModelStateRequest__.html#a4b15abcdd6f57dd69eaa959f25642509) == "map" || req.[relative_entity_name](../../gazebo_msgs/html/structgazebo__msgs_1_1GetModelStateRequest__.html#a4b15abcdd6f57dd69eaa959f25642509) == "/map")
    00954         {
    00955             [ROS_DEBUG](../../../api/rosconsole/html/macros__generated_8h.html#a83228c0b42c80605abdd0f42af64b1f7)("GetModelState: relative_entity_name is empty/world/map, using inertial frame");
    00956         }
    00957         else
    00958         {
    00959           res.[success](../../gazebo_msgs/html/structgazebo__msgs_1_1GetModelStateResponse__.html#aeb58e60c2f46b69ad7ff582169ae3b6c) = false;
    00960           res.[status_message](../../gazebo_msgs/html/structgazebo__msgs_1_1GetModelStateResponse__.html#a2ac60b79617ca44e69200efbafe6d3ee) = "GetModelState: reference relative_entity_name not found, did you forget to scope the body by model name?";
    00961           return false;
    00962         }
    00963
    00964         // fill in response
    00965         res.[pose](../../gazebo_msgs/html/structgazebo__msgs_1_1GetModelStateResponse__.html#a0256f03b0e119f8d35d0b080bdb1a86e).[position](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Pose__.html#a27067d1772d85a856b0e4ed4690a80b4).[x](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Point__.html#acd9420e6916084b2a9c09019bfda1708) = model_pos.x;
    00966         res.[pose](../../gazebo_msgs/html/structgazebo__msgs_1_1GetModelStateResponse__.html#a0256f03b0e119f8d35d0b080bdb1a86e).[position](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Pose__.html#a27067d1772d85a856b0e4ed4690a80b4).[y](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Point__.html#a46a84ff5a3e5817ab5693abda66fccb0) = model_pos.y;
    00967         res.[pose](../../gazebo_msgs/html/structgazebo__msgs_1_1GetModelStateResponse__.html#a0256f03b0e119f8d35d0b080bdb1a86e).[position](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Pose__.html#a27067d1772d85a856b0e4ed4690a80b4).[z](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Point__.html#a061f0093e927a95998f35ceceb5cebda) = model_pos.z;
    00968         res.[pose](../../gazebo_msgs/html/structgazebo__msgs_1_1GetModelStateResponse__.html#a0256f03b0e119f8d35d0b080bdb1a86e).[orientation](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Pose__.html#af8c1d34a44a7628ea9c3e571339f5a28).[w](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Quaternion__.html#a440791d268a65607ecbac21e0ed153cf) = model_rot.u;
    00969         res.[pose](../../gazebo_msgs/html/structgazebo__msgs_1_1GetModelStateResponse__.html#a0256f03b0e119f8d35d0b080bdb1a86e).[orientation](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Pose__.html#af8c1d34a44a7628ea9c3e571339f5a28).[x](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Quaternion__.html#a11f3b4e2df587ce516fd2a8140c1c7c5) = model_rot.x;
    00970         res.[pose](../../gazebo_msgs/html/structgazebo__msgs_1_1GetModelStateResponse__.html#a0256f03b0e119f8d35d0b080bdb1a86e).[orientation](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Pose__.html#af8c1d34a44a7628ea9c3e571339f5a28).[y](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Quaternion__.html#a601c978178311ce3a618afb38c0b6b98) = model_rot.y;
    00971         res.[pose](../../gazebo_msgs/html/structgazebo__msgs_1_1GetModelStateResponse__.html#a0256f03b0e119f8d35d0b080bdb1a86e).[orientation](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Pose__.html#af8c1d34a44a7628ea9c3e571339f5a28).[z](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Quaternion__.html#ae2caceb9fc4b2fd01acd8419aa7ebc2e) = model_rot.z;
    00972
    00973         res.[twist](../../gazebo_msgs/html/structgazebo__msgs_1_1GetModelStateResponse__.html#a36b1535a3a2572860b77a9f719cfb11a).[linear](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Twist__.html#a394500332ac20028528c37103e1bf8e5).[x](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Vector3__.html#abf9dabaf651196aee50fd14bf3b643be) = model_linear_vel.x;
    00974         res.[twist](../../gazebo_msgs/html/structgazebo__msgs_1_1GetModelStateResponse__.html#a36b1535a3a2572860b77a9f719cfb11a).[linear](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Twist__.html#a394500332ac20028528c37103e1bf8e5).[y](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Vector3__.html#aaea58ad929c43960a06f728d97132404) = model_linear_vel.y;
    00975         res.[twist](../../gazebo_msgs/html/structgazebo__msgs_1_1GetModelStateResponse__.html#a36b1535a3a2572860b77a9f719cfb11a).[linear](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Twist__.html#a394500332ac20028528c37103e1bf8e5).[z](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Vector3__.html#a4cde719326e6c3688ab50b51ab4708b1) = model_linear_vel.z;
    00976         res.[twist](../../gazebo_msgs/html/structgazebo__msgs_1_1GetModelStateResponse__.html#a36b1535a3a2572860b77a9f719cfb11a).[angular](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Twist__.html#aa0cb518e509179290aa793228ef01f6b).[x](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Vector3__.html#abf9dabaf651196aee50fd14bf3b643be) = model_angular_vel.x;
    00977         res.[twist](../../gazebo_msgs/html/structgazebo__msgs_1_1GetModelStateResponse__.html#a36b1535a3a2572860b77a9f719cfb11a).[angular](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Twist__.html#aa0cb518e509179290aa793228ef01f6b).[y](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Vector3__.html#aaea58ad929c43960a06f728d97132404) = model_angular_vel.y;
    00978         res.[twist](../../gazebo_msgs/html/structgazebo__msgs_1_1GetModelStateResponse__.html#a36b1535a3a2572860b77a9f719cfb11a).[angular](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Twist__.html#aa0cb518e509179290aa793228ef01f6b).[z](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Vector3__.html#a4cde719326e6c3688ab50b51ab4708b1) = model_angular_vel.z;
    00979
    00980         res.[success](../../gazebo_msgs/html/structgazebo__msgs_1_1GetModelStateResponse__.html#aeb58e60c2f46b69ad7ff582169ae3b6c) = true;


* Open Source


> Launch the user interface window of Gazebo (default true)


[ ](javascript:; "Ouch") 0


    <?xml version="1.0" ?>
    <sdf version="1.4">
      <world name="default">
        <include>
          <uri>model://ground_plane</uri>
        </include>
        <include>
          <uri>model://sun</uri>
        </include>
        <include>
          <uri>model://gas_station</uri>
          <name>gas_station</name>
          <pose>-2.0 7.0 0 0 0 0</pose>
        </include>
        <include>
          <uri>model://MYROBOT_description</uri>
        </include>
      </world>
    </sdf>


Collaborator


[ _≫_ Next: Mesh optimization for "fast" simulation
](//gazebo214.rssing.com/chan-57893035/latest.php#c57893035a6948 "Next
Article")


###  [ Saline County Jail Booking Activity – Thursday, December 10th
](////salina38.rssing.com/chan-7227570/article921.html#c7227570a921i63989072)


Explore


[ ](javascript:; "Like") 0


Copy link


[ ](javascript:; "Share Page")


[
![@rcywongaa](https://avatars.githubusercontent.com/u/7285669?s=80&u=f519c42eb9805998e455ed5c15cafce90fb2d638&v=4)
](/rcywongaa)


Sign up for GitHub


[ ](//www.rssing.com/index.php?zw=2123 "Home") [ $ ](javascript:; "MoMoney")


[ ![Stay Salty POTS Awareness Stretchy Stacking Bracelets | Set of
Three|...](//i.etsystatic.com/28677176/r/il/b2413c/4350795851/il_570xN.4350795851_fflz.jpg)
](////pomaces4.rssing.com/chan-3795444/article11960.html#c3795444a11960i1086411135)


[ ![@hsu](https://avatars.githubusercontent.com/u/138109?s=80&v=4) ](/hsu)


May 10, 2022, 6:59 pm


July 17, 2023, 7:22 am


[ ![@Nurgak](https://avatars.githubusercontent.com/u/1785126?s=80&v=4)
](/Nurgak)


#  [ Create voxel map from a gazebo world
](//gazebo214.rssing.com/chan-57893035/latest-article7-live.php)


Pose service on [/world/default/set_pose] [Msg] Pose service on
[/world/default/set_pose_vector] [Msg] Light configuration service on
[/world/default/light_config] [Msg] Physics service on
[/world/default/set_physics] [Msg] SphericalCoordinates service on
[/world/default/set_spherical_coordinates] [Msg] Enable collision service on
[/world/default/enable_collision] [Msg] Disable collision service on
[/world/default/disable_collision] [Msg] Material service on
[/world/default/visual_config] [Msg] Material service on
[/world/default/wheel_slip] [Dbg] [SystemManager.cc:58] Loaded system
[ignition::gazebo::systems::UserCommands] for entity [1] [Dbg]
[SystemManager.cc:58] Loaded system
[ignition::gazebo::systems::SceneBroadcaster] for entity [1] [Msg] Serving
world controls on [/world/default/control], [/world/default/control/state] and
[/world/default/playback/control] [Msg] Serving GUI information on
[/world/default/gui/info] [Msg] World [default] initialized with [1ms] physics
profile. [Msg] Serving world SDF generation service on
[/world/default/generate_world_sdf] [Msg] Serving world names on
[/gazebo/worlds] [Msg] Resource path add service on
[/gazebo/resource_paths/add]. [Msg] Resource path get service on
[/gazebo/resource_paths/get]. [Msg] Resource path resolve service on
[/gazebo/resource_paths/resolve]. [Msg] Resource paths published on
[/gazebo/resource_paths]. [Msg] Server control service on [/server_control].
[GUI] [Wrn] [Application.cc:797] [QT] qrc:/qml/StyleDialog.qml:112:3: QML
Connections: Implicitly defined onFoo properties in Connections are
deprecated. Use this syntax instead: function onFoo(  ) { ... } [GUI] [Wrn]
[Application.cc:797] [QT] qrc:/qml/StyleDialog.qml:105:3: QML Connections:
Implicitly defined onFoo properties in Connections are deprecated. Use this
syntax instead: function onFoo(  ) { ... } [GUI] [Wrn] [Application.cc:797]
[QT] qrc:/qml/StyleDialog.qml:98:3: QML Connections: Implicitly defined onFoo
properties in Connections are deprecated. Use this syntax instead: function
onFoo(  ) { ... } [GUI] [Wrn] [Application.cc:797] [QT]
qrc:qml/Main.qml:102:3: QML Connections: Implicitly defined onFoo properties
in Connections are deprecated. Use this syntax instead: function onFoo(  ) {
... } [GUI] [Wrn] [Application.cc:797] [QT] qrc:/qml/PluginMenu.qml:27:3: QML
Connections: Implicitly defined onFoo properties in Connections are
deprecated. Use this syntax instead: function onFoo(  ) { ... } [GUI] [Dbg]
[PathManager.cc:66] Requesting resource paths through
[/gazebo/resource_paths/get] [GUI] [Wrn] [Application.cc:797] [QT]
file::/Gazebo/GazeboDrawer.qml:241:3: QML Connections: Implicitly defined
onFoo properties in Connections are deprecated. Use this syntax instead:


**[ jbohren ](/jbohren) ** commented  Oct 21, 2014


what is the Gazebo version you are using? This worked for me when I updated
Gazebo 7 to 7.15 after adding the [ mirror
](http://gazebosim.org/tutorials?tut=install_ubuntu&cat=install) . On Gazebo
7.0.0 it really didn't work for me.

---

All reactions


    01325           joint->SetAttribute(gazebo::Joint::LO_STOP,[i](../../../api/ivcon/html/ivcon_8c.html#acb559820d9ca11295b4500f179ef6392),req.[ode_joint_config](../../gazebo_msgs/html/structgazebo__msgs_1_1SetJointPropertiesRequest__.html#a46c6f9d85a9286f37692778a3aacd393).[loStop](../../gazebo_msgs/html/structgazebo__msgs_1_1ODEJointProperties__.html#a74f82eb47721f4e8ee30834a7cc72035)[[i](../../../api/ivcon/html/ivcon_8c.html#acb559820d9ca11295b4500f179ef6392)]);
    01326         for(unsigned int [i](../../../api/ivcon/html/ivcon_8c.html#acb559820d9ca11295b4500f179ef6392)=0;[i](../../../api/ivcon/html/ivcon_8c.html#acb559820d9ca11295b4500f179ef6392)< req.[ode_joint_config](../../gazebo_msgs/html/structgazebo__msgs_1_1SetJointPropertiesRequest__.html#a46c6f9d85a9286f37692778a3aacd393).[erp](../../gazebo_msgs/html/structgazebo__msgs_1_1ODEJointProperties__.html#af007409dc5a4ffc7308216a549d16d22).size();[i](../../../api/ivcon/html/ivcon_8c.html#acb559820d9ca11295b4500f179ef6392)++)
    01327           joint->SetAttribute(gazebo::Joint::ERP,[i](../../../api/ivcon/html/ivcon_8c.html#acb559820d9ca11295b4500f179ef6392),req.[ode_joint_config](../../gazebo_msgs/html/structgazebo__msgs_1_1SetJointPropertiesRequest__.html#a46c6f9d85a9286f37692778a3aacd393).[erp](../../gazebo_msgs/html/structgazebo__msgs_1_1ODEJointProperties__.html#af007409dc5a4ffc7308216a549d16d22)[[i](../../../api/ivcon/html/ivcon_8c.html#acb559820d9ca11295b4500f179ef6392)]);
    01328         for(unsigned int [i](../../../api/ivcon/html/ivcon_8c.html#acb559820d9ca11295b4500f179ef6392)=0;[i](../../../api/ivcon/html/ivcon_8c.html#acb559820d9ca11295b4500f179ef6392)< req.[ode_joint_config](../../gazebo_msgs/html/structgazebo__msgs_1_1SetJointPropertiesRequest__.html#a46c6f9d85a9286f37692778a3aacd393).[cfm](../../gazebo_msgs/html/structgazebo__msgs_1_1ODEJointProperties__.html#a640adfcaf8640dc88aee269adb26277c).size();[i](../../../api/ivcon/html/ivcon_8c.html#acb559820d9ca11295b4500f179ef6392)++)
    01329           joint->SetAttribute(gazebo::Joint::CFM,[i](../../../api/ivcon/html/ivcon_8c.html#acb559820d9ca11295b4500f179ef6392),req.[ode_joint_config](../../gazebo_msgs/html/structgazebo__msgs_1_1SetJointPropertiesRequest__.html#a46c6f9d85a9286f37692778a3aacd393).[cfm](../../gazebo_msgs/html/structgazebo__msgs_1_1ODEJointProperties__.html#a640adfcaf8640dc88aee269adb26277c)[[i](../../../api/ivcon/html/ivcon_8c.html#acb559820d9ca11295b4500f179ef6392)]);
    01330         for(unsigned int [i](../../../api/ivcon/html/ivcon_8c.html#acb559820d9ca11295b4500f179ef6392)=0;[i](../../../api/ivcon/html/ivcon_8c.html#acb559820d9ca11295b4500f179ef6392)< req.[ode_joint_config](../../gazebo_msgs/html/structgazebo__msgs_1_1SetJointPropertiesRequest__.html#a46c6f9d85a9286f37692778a3aacd393).[stop_erp](../../gazebo_msgs/html/structgazebo__msgs_1_1ODEJointProperties__.html#abf6f00149b8662fba4178b5fa30e1ad8).size();[i](../../../api/ivcon/html/ivcon_8c.html#acb559820d9ca11295b4500f179ef6392)++)
    01331           joint->SetAttribute(gazebo::Joint::STOP_ERP,[i](../../../api/ivcon/html/ivcon_8c.html#acb559820d9ca11295b4500f179ef6392),req.[ode_joint_config](../../gazebo_msgs/html/structgazebo__msgs_1_1SetJointPropertiesRequest__.html#a46c6f9d85a9286f37692778a3aacd393).[stop_erp](../../gazebo_msgs/html/structgazebo__msgs_1_1ODEJointProperties__.html#abf6f00149b8662fba4178b5fa30e1ad8)[[i](../../../api/ivcon/html/ivcon_8c.html#acb559820d9ca11295b4500f179ef6392)]);
    01332         for(unsigned int [i](../../../api/ivcon/html/ivcon_8c.html#acb559820d9ca11295b4500f179ef6392)=0;[i](../../../api/ivcon/html/ivcon_8c.html#acb559820d9ca11295b4500f179ef6392)< req.[ode_joint_config](../../gazebo_msgs/html/structgazebo__msgs_1_1SetJointPropertiesRequest__.html#a46c6f9d85a9286f37692778a3aacd393).[stop_cfm](../../gazebo_msgs/html/structgazebo__msgs_1_1ODEJointProperties__.html#a22b2982b0f5619e36475dc5a30d06857).size();[i](../../../api/ivcon/html/ivcon_8c.html#acb559820d9ca11295b4500f179ef6392)++)
    01333           joint->SetAttribute(gazebo::Joint::STOP_CFM,[i](../../../api/ivcon/html/ivcon_8c.html#acb559820d9ca11295b4500f179ef6392),req.[ode_joint_config](../../gazebo_msgs/html/structgazebo__msgs_1_1SetJointPropertiesRequest__.html#a46c6f9d85a9286f37692778a3aacd393).[stop_cfm](../../gazebo_msgs/html/structgazebo__msgs_1_1ODEJointProperties__.html#a22b2982b0f5619e36475dc5a30d06857)[[i](../../../api/ivcon/html/ivcon_8c.html#acb559820d9ca11295b4500f179ef6392)]);
    01334         for(unsigned int [i](../../../api/ivcon/html/ivcon_8c.html#acb559820d9ca11295b4500f179ef6392)=0;[i](../../../api/ivcon/html/ivcon_8c.html#acb559820d9ca11295b4500f179ef6392)< req.[ode_joint_config](../../gazebo_msgs/html/structgazebo__msgs_1_1SetJointPropertiesRequest__.html#a46c6f9d85a9286f37692778a3aacd393).[fudge_factor](../../gazebo_msgs/html/structgazebo__msgs_1_1ODEJointProperties__.html#a8a2eceef6d4bc6ce5ec46d479ed30b50).size();[i](../../../api/ivcon/html/ivcon_8c.html#acb559820d9ca11295b4500f179ef6392)++)
    01335           joint->SetAttribute(gazebo::Joint::FUDGE_FACTOR,[i](../../../api/ivcon/html/ivcon_8c.html#acb559820d9ca11295b4500f179ef6392),req.[ode_joint_config](../../gazebo_msgs/html/structgazebo__msgs_1_1SetJointPropertiesRequest__.html#a46c6f9d85a9286f37692778a3aacd393).[fudge_factor](../../gazebo_msgs/html/structgazebo__msgs_1_1ODEJointProperties__.html#a8a2eceef6d4bc6ce5ec46d479ed30b50)[[i](../../../api/ivcon/html/ivcon_8c.html#acb559820d9ca11295b4500f179ef6392)]);
    01336         for(unsigned int [i](../../../api/ivcon/html/ivcon_8c.html#acb559820d9ca11295b4500f179ef6392)=0;[i](../../../api/ivcon/html/ivcon_8c.html#acb559820d9ca11295b4500f179ef6392)< req.[ode_joint_config](../../gazebo_msgs/html/structgazebo__msgs_1_1SetJointPropertiesRequest__.html#a46c6f9d85a9286f37692778a3aacd393).[fmax](../../gazebo_msgs/html/structgazebo__msgs_1_1ODEJointProperties__.html#a238204f13ed86bd7e44713c30e97ed80).size();[i](../../../api/ivcon/html/ivcon_8c.html#acb559820d9ca11295b4500f179ef6392)++)
    01337           joint->SetAttribute(gazebo::Joint::FMAX,[i](../../../api/ivcon/html/ivcon_8c.html#acb559820d9ca11295b4500f179ef6392),req.[ode_joint_config](../../gazebo_msgs/html/structgazebo__msgs_1_1SetJointPropertiesRequest__.html#a46c6f9d85a9286f37692778a3aacd393).[fmax](../../gazebo_msgs/html/structgazebo__msgs_1_1ODEJointProperties__.html#a238204f13ed86bd7e44713c30e97ed80)[[i](../../../api/ivcon/html/ivcon_8c.html#acb559820d9ca11295b4500f179ef6392)]);
    01338         for(unsigned int [i](../../../api/ivcon/html/ivcon_8c.html#acb559820d9ca11295b4500f179ef6392)=0;[i](../../../api/ivcon/html/ivcon_8c.html#acb559820d9ca11295b4500f179ef6392)< req.[ode_joint_config](../../gazebo_msgs/html/structgazebo__msgs_1_1SetJointPropertiesRequest__.html#a46c6f9d85a9286f37692778a3aacd393).[vel](../../gazebo_msgs/html/structgazebo__msgs_1_1ODEJointProperties__.html#a014817b19242effdb80f55113127124b).size();[i](../../../api/ivcon/html/ivcon_8c.html#acb559820d9ca11295b4500f179ef6392)++)
    01339           joint->SetAttribute(gazebo::Joint::VEL,[i](../../../api/ivcon/html/ivcon_8c.html#acb559820d9ca11295b4500f179ef6392),req.[ode_joint_config](../../gazebo_msgs/html/structgazebo__msgs_1_1SetJointPropertiesRequest__.html#a46c6f9d85a9286f37692778a3aacd393).[vel](../../gazebo_msgs/html/structgazebo__msgs_1_1ODEJointProperties__.html#a014817b19242effdb80f55113127124b)[[i](../../../api/ivcon/html/ivcon_8c.html#acb559820d9ca11295b4500f179ef6392)]);
    01340
    01341         res.[success](../../gazebo_msgs/html/structgazebo__msgs_1_1SetJointPropertiesResponse__.html#a096c5a5c26c0786b03971c3f9ec2b895) = true;
    01342         res.[status_message](../../gazebo_msgs/html/structgazebo__msgs_1_1SetJointPropertiesResponse__.html#a49f3349c2fc084eb75ed189b49d8da9d) = "SetJointProperties: properties set";
    01343         return true;
    01344       }
    01345     }
    01346
    [01349](classGazeboROSNode.html#ac4af722aa708173354b6aa935fcf3d00)     bool [setModelState](classGazeboROSNode.html#ac4af722aa708173354b6aa935fcf3d00)([gazebo_msgs::SetModelState::Request](../../gazebo_msgs/html/structgazebo__msgs_1_1SetModelStateRequest__.html) &req,[gazebo_msgs::SetModelState::Response](../../gazebo_msgs/html/structgazebo__msgs_1_1SetModelStateResponse__.html) &res)
    01350     {
    01351       gazebo::Vector3 target_pos(req.[model_state](../../gazebo_msgs/html/structgazebo__msgs_1_1SetModelStateRequest__.html#a6a20bccbfd561c02ae793bd41a6742e5).[pose](../../gazebo_msgs/html/structgazebo__msgs_1_1ModelState__.html#a0471a1e8fef12b2311405ab099c16311).[position](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Pose__.html#a27067d1772d85a856b0e4ed4690a80b4).[x](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Point__.html#acd9420e6916084b2a9c09019bfda1708),req.[model_state](../../gazebo_msgs/html/structgazebo__msgs_1_1SetModelStateRequest__.html#a6a20bccbfd561c02ae793bd41a6742e5).[pose](../../gazebo_msgs/html/structgazebo__msgs_1_1ModelState__.html#a0471a1e8fef12b2311405ab099c16311).[position](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Pose__.html#a27067d1772d85a856b0e4ed4690a80b4).[y](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Point__.html#a46a84ff5a3e5817ab5693abda66fccb0),req.[model_state](../../gazebo_msgs/html/structgazebo__msgs_1_1SetModelStateRequest__.html#a6a20bccbfd561c02ae793bd41a6742e5).[pose](../../gazebo_msgs/html/structgazebo__msgs_1_1ModelState__.html#a0471a1e8fef12b2311405ab099c16311).[position](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Pose__.html#a27067d1772d85a856b0e4ed4690a80b4).[z](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Point__.html#a061f0093e927a95998f35ceceb5cebda));
    01352       gazebo::Quatern target_rot(req.[model_state](../../gazebo_msgs/html/structgazebo__msgs_1_1SetModelStateRequest__.html#a6a20bccbfd561c02ae793bd41a6742e5).[pose](../../gazebo_msgs/html/structgazebo__msgs_1_1ModelState__.html#a0471a1e8fef12b2311405ab099c16311).[orientation](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Pose__.html#af8c1d34a44a7628ea9c3e571339f5a28).[w](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Quaternion__.html#a440791d268a65607ecbac21e0ed153cf),req.[model_state](../../gazebo_msgs/html/structgazebo__msgs_1_1SetModelStateRequest__.html#a6a20bccbfd561c02ae793bd41a6742e5).[pose](../../gazebo_msgs/html/structgazebo__msgs_1_1ModelState__.html#a0471a1e8fef12b2311405ab099c16311).[orientation](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Pose__.html#af8c1d34a44a7628ea9c3e571339f5a28).[x](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Quaternion__.html#a11f3b4e2df587ce516fd2a8140c1c7c5),req.[model_state](../../gazebo_msgs/html/structgazebo__msgs_1_1SetModelStateRequest__.html#a6a20bccbfd561c02ae793bd41a6742e5).[pose](../../gazebo_msgs/html/structgazebo__msgs_1_1ModelState__.html#a0471a1e8fef12b2311405ab099c16311).[orientation](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Pose__.html#af8c1d34a44a7628ea9c3e571339f5a28).[y](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Quaternion__.html#a601c978178311ce3a618afb38c0b6b98),req.[model_state](../../gazebo_msgs/html/structgazebo__msgs_1_1SetModelStateRequest__.html#a6a20bccbfd561c02ae793bd41a6742e5).[pose](../../gazebo_msgs/html/structgazebo__msgs_1_1ModelState__.html#a0471a1e8fef12b2311405ab099c16311).[orientation](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Pose__.html#af8c1d34a44a7628ea9c3e571339f5a28).[z](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Quaternion__.html#ae2caceb9fc4b2fd01acd8419aa7ebc2e));
    01353       gazebo::Pose3d target_pose(target_pos,target_rot);
    01354       gazebo::Vector3 target_pos_dot(req.[model_state](../../gazebo_msgs/html/structgazebo__msgs_1_1SetModelStateRequest__.html#a6a20bccbfd561c02ae793bd41a6742e5).[twist](../../gazebo_msgs/html/structgazebo__msgs_1_1ModelState__.html#a37dfdabcf8573e879e920543b33a7975).[linear](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Twist__.html#a394500332ac20028528c37103e1bf8e5).[x](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Vector3__.html#abf9dabaf651196aee50fd14bf3b643be),req.[model_state](../../gazebo_msgs/html/structgazebo__msgs_1_1SetModelStateRequest__.html#a6a20bccbfd561c02ae793bd41a6742e5).[twist](../../gazebo_msgs/html/structgazebo__msgs_1_1ModelState__.html#a37dfdabcf8573e879e920543b33a7975).[linear](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Twist__.html#a394500332ac20028528c37103e1bf8e5).[y](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Vector3__.html#aaea58ad929c43960a06f728d97132404),req.[model_state](../../gazebo_msgs/html/structgazebo__msgs_1_1SetModelStateRequest__.html#a6a20bccbfd561c02ae793bd41a6742e5).[twist](../../gazebo_msgs/html/structgazebo__msgs_1_1ModelState__.html#a37dfdabcf8573e879e920543b33a7975).[linear](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Twist__.html#a394500332ac20028528c37103e1bf8e5).[z](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Vector3__.html#a4cde719326e6c3688ab50b51ab4708b1));
    01355       gazebo::Vector3 target_rot_dot(req.[model_state](../../gazebo_msgs/html/structgazebo__msgs_1_1SetModelStateRequest__.html#a6a20bccbfd561c02ae793bd41a6742e5).[twist](../../gazebo_msgs/html/structgazebo__msgs_1_1ModelState__.html#a37dfdabcf8573e879e920543b33a7975).[angular](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Twist__.html#aa0cb518e509179290aa793228ef01f6b).[x](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Vector3__.html#abf9dabaf651196aee50fd14bf3b643be),req.[model_state](../../gazebo_msgs/html/structgazebo__msgs_1_1SetModelStateRequest__.html#a6a20bccbfd561c02ae793bd41a6742e5).[twist](../../gazebo_msgs/html/structgazebo__msgs_1_1ModelState__.html#a37dfdabcf8573e879e920543b33a7975).[angular](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Twist__.html#aa0cb518e509179290aa793228ef01f6b).[y](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Vector3__.html#aaea58ad929c43960a06f728d97132404),req.[model_state](../../gazebo_msgs/html/structgazebo__msgs_1_1SetModelStateRequest__.html#a6a20bccbfd561c02ae793bd41a6742e5).[twist](../../gazebo_msgs/html/structgazebo__msgs_1_1ModelState__.html#a37dfdabcf8573e879e920543b33a7975).[angular](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Twist__.html#aa0cb518e509179290aa793228ef01f6b).[z](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Vector3__.html#a4cde719326e6c3688ab50b51ab4708b1));
    01356
    01357       gazebo::Model* model = dynamic_cast<gazebo::Model*>(gazebo::World::Instance()->GetEntityByName(req.[model_state](../../gazebo_msgs/html/structgazebo__msgs_1_1SetModelStateRequest__.html#a6a20bccbfd561c02ae793bd41a6742e5).[model_name](../../gazebo_msgs/html/structgazebo__msgs_1_1ModelState__.html#acddb4cc1ba3d29b97db1141f78c454f0)));
    01358       if (!model)
    01359       {
    01360         [ROS_ERROR](../../../api/rosconsole/html/macros__generated_8h.html#a7fb635b03cc608284eadecd2f8becd9a)("SetModelState: model [%s] does not exist",req.[model_state](../../gazebo_msgs/html/structgazebo__msgs_1_1SetModelStateRequest__.html#a6a20bccbfd561c02ae793bd41a6742e5).[model_name](../../gazebo_msgs/html/structgazebo__msgs_1_1ModelState__.html#acddb4cc1ba3d29b97db1141f78c454f0).c_str());
    01361         res.[success](../../gazebo_msgs/html/structgazebo__msgs_1_1SetModelStateResponse__.html#acca9802bb129cd425a0eeb458fac040e) = false;
    01362         res.[status_message](../../gazebo_msgs/html/structgazebo__msgs_1_1SetModelStateResponse__.html#abe59335014d06188f09f6ef2f91447cb) = "SetModelState: model does not exist";
    01363         return false;
    01364       }
    01365       else
    01366       {


[ @ironmig ](https://github.com/ironmig) Now I have a strange situation: to
illustrate the problem I downloaded the SimpleScreenRecorder program to show
what happens, every time I run the simulation without SimpleScreenRecorder
recording the rover flies away, but while I'm recording everything behaves
normally and the rover falls as expected.


[ _≫_ Next: [gazebo-1]; process has died [pid 3631, exit code 139
](//gazebo214.rssing.com/chan-57893035/latest.php#c57893035a6936 "Next
Article")


[ X ](javascript:;) Mark channel Not-Safe-For-Work?  [ cancel ](javascript:;)
[ confirm ](javascript:;) NSFW Votes:  (  0  votes)


[ _≪_ Previous: How to access contact Information form via the
EntityComponentManager?
](//gazebo214.rssing.com/chan-57893035/latest.php#c57893035a6924 "Previous
Article")


[ Search ](javascript:;)


Viewing latest articles


  * Create a ROS package with the convention MYROBOT_gazebo
  * Within this package, create a ` launch ` folder
  * Within the ` launch ` folder create a YOUROBOT.launch file with the following contents (default arguments excluded):


July 21, 2023, 10:47 pm


Closed


###  [ Decoration of the High Command of the Hitler Youth for Distinguished
Foreigners
](////ailsby1.rssing.com/chan-14855252/article8.html#c14855252a8i1619676318)


    argvClient[i] = _argv[i];
  }
  argvServer[_argc] = static_cast<char*>(NULL);
  argvClient[_argc] = static_cast<char*>(NULL);
  // Need to check the return of wait function (8 lines below) to know
  // what should be returned by the process
  int returnValue = 0;
  if (pid1)
  {
    pid2 = fork();
    if (pid2)
    {
      int child_exit_status;
      pid_t dead_child = wait(&child_exit_status);
      // WIFEXITED will return zero if the process finished not reaching
      // return or exit calls.
      // WEXITSTATUS will check the value of the return function, not being
      // zero means problems.
      if ((WIFEXITED(child_exit_status)   == 0) ||
          (WEXITSTATUS(child_exit_status) != 0))
        returnValue = -1;
      else
        returnValue = 0;
      if (dead_child == pid1)
        killed1 = true;
      else if (dead_child == pid2)
        killed2 = true;
      // one of the children died
      if (!sig_killed)
        sig_handler(SIGINT);
    }
    else
    {
      // remove client from foreground process group
      setpgid(0, 0);
      execvp(argvClient[0], argvClient);
    }
  }
  else
  {


[ ](javascript:; "Ouch") 0


[ bug  ](/ros-simulation/gazebo_ros_pkgs/labels/bug) [ needs feedback  ](/ros-
simulation/gazebo_ros_pkgs/labels/needs%20feedback) [ needs gazebo feedback
](/ros-simulation/gazebo_ros_pkgs/labels/needs%20gazebo%20feedback)


#  [ How to generate a 3D occupancy map for a Gazebo world
](//gazebo214.rssing.com/chan-57893035/latest-article5-live.php)


[ _≫_ Next: Gazebo allows one model to be inserted and then it freezes
](//gazebo214.rssing.com/chan-57893035/latest.php#c57893035a6931 "Next
Article")


Collaborator


[
![@fmessmer](https://avatars.githubusercontent.com/u/508006?s=80&u=34cff5e25c579c359ad4f4b566fbc425f1b353e5&v=4)
](/fmessmer)


[ ](javascript:; "Share Article") [
](//www.rssing.com/contact.php?r=o6&u=%2F%2Fgazebo214.rssing.com%2Fchan-57893035%2Flatest-
article15-live.php "Article Support")


##  Next Steps


**[ davetcoleman ](/davetcoleman) ** commented  Aug 8, 2014


**[ hsu ](/hsu) ** commented  Nov 23, 2013


If you do not yet have a URDF to test, as an example you can download the
baxter_description package from Rethink Robotics's [ baxter_common
](https://github.com/RethinkRobotics/baxter_common) repo. Put this package
into your catkin workspace by running:


Copy link


July 25, 2023, 12:31 pm


[ ](//www.rssing.com/index.php?zw=2123 "Home") [ $ ](javascript:; "MoMoney")


I experienced this issue with ROS Kinetic and Gazebo 9 (ros-kinetic-desktop-
full version).. [ @musamarcusso ](https://github.com/musamarcusso) your
solution initially worked, but it started showing strange behaviour again.

---

All reactions


Sorry, something went wrong.


#  [ help for installing lidar on a drone
](//gazebo214.rssing.com/chan-57893035/latest-article17-live.php)


rosrun gazebo_ros spawn_model -file `rospack find baxter_description`/urdf/baxter.urdf -urdf -z 1 -model baxter


I'm convinced it is a race condition. With the exact same launch file, 1 out
of 10 times, ` -J ` fails. It seems to happen less frequently when the
computer is heavily loaded or when using a slower PC.

---

All reactions


**headless** (deprecated) **recording** (previously called headless)


[ hsu ](/hsu) added a commit that referenced this issue  Dec 13, 2014


To see all available qualifiers, see our [ documentation
](https://docs.github.com/search-github/github-code-search/understanding-
github-code-search-syntax) .


[ _≫_ Next: HOW TO CREATE QR CODE IN GAZEBO11
](//gazebo214.rssing.com/chan-57893035/latest.php#c57893035a6945 "Next
Article")


**[ davetcoleman ](/davetcoleman) ** commented  Nov 15, 2013


August 7, 2023, 3:06 am


The next section will walk you through making some of this setup for use with
a custom world file.


April 8, 2024, 2:19 am


[ ](javascript:; "Share Article") [
](//www.rssing.com/contact.php?r=o6&u=%2F%2Fgazebo214.rssing.com%2Fchan-57893035%2Flatest-
article20-live.php "Article Support")


Copy link


Pick a username


August 1, 2023, 2:23 am


[ _≪_ Previous: include model in world 2023
](//gazebo214.rssing.com/chan-57893035/latest.php#c57893035a6934 "Previous
Article")


I'm trying to use gz-sim-diff-drive-system plugin like this:  Revolute 10
Revolute 9  0.2  0.04  1  cmd_vel  but receiving the following error when
starting gazebo: [ruby $(which ign) gazebo-2] [Err] [SystemLoader.cc:78]
Failed to load system plugin [gz-sim-diff-drive-system] : couldn't find shared
library. ROS2 version: Iron Gazebo version: Garden


[ ](javascript:; "Ouch") 0


[ ros-simulation ](/ros-simulation) /  **[ gazebo_ros_pkgs ](/ros-
simulation/gazebo_ros_pkgs) ** Public


[
![@miguelriemoliveira](https://avatars.githubusercontent.com/u/11350998?s=40&v=4)
](/miguelriemoliveira) [ miguelriemoliveira ](/miguelriemoliveira) mentioned
this issue  Nov 18, 2023


Launching this file, you should see the PR2 in the gas station as pictured:


August 9, 2023, 9:10 am


**[ rcywongaa ](/rcywongaa) ** commented  Jan 12, 2021


###  [ Woman is 21st murder victim
](////barbados171.rssing.com/chan-13839764/article16821.html#c13839764a16821i186843027)


Include my email address so I can be contacted


Then adding this to your launch file created previously in this tutorial:


Continuing with our examination of the ` mud_world.launch ` file, we will now
look at the contents of the ` mud.world ` file. The first several components
of the mud world is shown below:


roslaunch gazebo_ros simple_arm_world.launch


[ ](https://github.com "GitHub") © 2024 GitHub, Inc.


Related to [ https://bitbucket.org/osrf/gazebo/pull-request/628/allow-scoped-
and-non-scoped-joint-names-to/diff ](https://bitbucket.org/osrf/gazebo/pull-
request/628/allow-scoped-and-non-scoped-joint-names-to/diff)

---

All reactions


**[ Nurgak ](/Nurgak) ** commented  Jun 2, 2018


[ ](javascript:; "Share Article") [
](//www.rssing.com/contact.php?r=o6&u=%2F%2Fgazebo214.rssing.com%2Fchan-57893035%2Flatest-
article5-live.php "Article Support")


[ _≫_ Next: Vibration in Gazebo model.
](//gazebo214.rssing.com/chan-57893035/latest.php#c57893035a6951 "Next
Article")


[
![@musamarcusso](https://avatars.githubusercontent.com/u/20180849?s=80&u=745333d0934f6e2a8167631b74be0d81f25fabad&v=4)
](/musamarcusso)


[ ](javascript:; "Share Article") [
](//www.rssing.com/contact.php?r=o6&u=%2F%2Fgazebo214.rssing.com%2Fchan-57893035%2Flatest-
article28-live.php "Article Support")


##  Use saved searches to filter your results more quickly


Milestone


###  ` roslaunch ` Arguments


    00408       [spawn_urdf_gazebo_service_](classGazeboROSNode.html#a7a24535e62917150745455c038963b78) = this->[rosnode_](classGazeboROSNode.html#ae9011736edb2ec542d7176cdddeb546d).[advertiseService](../../../api/roscpp/html/classros_1_1NodeHandle.html#ae659319707eb40e8ef302763f7d632da)(spawn_gazebo_model_aso);
    00409
    00410       // Advertise delete services on the custom queue
    00411       std::string delete_model_service_name("delete_model");
    00412       [ros::AdvertiseServiceOptions](../../../api/roscpp/html/structros_1_1AdvertiseServiceOptions.html) delete_aso = ros::AdvertiseServiceOptions::create<gazebo_msgs::DeleteModel>(
    00413           delete_model_service_name,boost::bind(&[GazeboROSNode::deleteModel](classGazeboROSNode.html#aa2df2752fb37a98ee82d41ea2aa2bb11 "delete model given name"),this,_1,_2),
    00414           ros::VoidPtr(), &this->[gazebo_queue_](classGazeboROSNode.html#aaad18c9d54a8736ea6337821de03889a));
    00415       [delete_model_service_](classGazeboROSNode.html#ae77996b35f6b28516ecc168075da1288) = this->[rosnode_](classGazeboROSNode.html#ae9011736edb2ec542d7176cdddeb546d).[advertiseService](../../../api/roscpp/html/classros_1_1NodeHandle.html#ae659319707eb40e8ef302763f7d632da)(delete_aso);
    00416
    00417       // Advertise more services on the custom queue
    00418       std::string get_model_properties_service_name("get_model_properties");
    00419       [ros::AdvertiseServiceOptions](../../../api/roscpp/html/structros_1_1AdvertiseServiceOptions.html) get_model_properties_aso = ros::AdvertiseServiceOptions::create<gazebo_msgs::GetModelProperties>(
    00420           get_model_properties_service_name,boost::bind(&[GazeboROSNode::getModelProperties](classGazeboROSNode.html#a981d4d5169d7bd4f3198ff1624ac32cb),this,_1,_2),
    00421           ros::VoidPtr(), &this->[gazebo_queue_](classGazeboROSNode.html#aaad18c9d54a8736ea6337821de03889a));
    00422       [get_model_properties_service_](classGazeboROSNode.html#a14c4ecaaf7e13e5f367f44b01e567d99) = this->[rosnode_](classGazeboROSNode.html#ae9011736edb2ec542d7176cdddeb546d).[advertiseService](../../../api/roscpp/html/classros_1_1NodeHandle.html#ae659319707eb40e8ef302763f7d632da)(get_model_properties_aso);
    00423
    00424       // Advertise more services on the custom queue
    00425       std::string get_model_state_service_name("get_model_state");
    00426       [ros::AdvertiseServiceOptions](../../../api/roscpp/html/structros_1_1AdvertiseServiceOptions.html) get_model_state_aso = ros::AdvertiseServiceOptions::create<gazebo_msgs::GetModelState>(
    00427           get_model_state_service_name,boost::bind(&[GazeboROSNode::getModelState](classGazeboROSNode.html#a53eeeb118297985653d890a89108e21f),this,_1,_2),
    00428           ros::VoidPtr(), &this->[gazebo_queue_](classGazeboROSNode.html#aaad18c9d54a8736ea6337821de03889a));
    00429       [get_model_state_service_](classGazeboROSNode.html#ade3fc7aa049f6434c87dc8f5cdb2b8eb) = this->[rosnode_](classGazeboROSNode.html#ae9011736edb2ec542d7176cdddeb546d).[advertiseService](../../../api/roscpp/html/classros_1_1NodeHandle.html#ae659319707eb40e8ef302763f7d632da)(get_model_state_aso);
    00430
    00431       // Advertise more services on the custom queue
    00432       std::string get_world_properties_service_name("get_world_properties");
    00433       [ros::AdvertiseServiceOptions](../../../api/roscpp/html/structros_1_1AdvertiseServiceOptions.html) get_world_properties_aso = ros::AdvertiseServiceOptions::create<gazebo_msgs::GetWorldProperties>(
    00434           get_world_properties_service_name,boost::bind(&[GazeboROSNode::getWorldProperties](classGazeboROSNode.html#ab485ea3ca05e68dd963edcdb64b99636),this,_1,_2),
    00435           ros::VoidPtr(), &this->[gazebo_queue_](classGazeboROSNode.html#aaad18c9d54a8736ea6337821de03889a));
    00436       [get_world_properties_service_](classGazeboROSNode.html#afd150de77e8d4e6fa4707e22586cb429) = this->[rosnode_](classGazeboROSNode.html#ae9011736edb2ec542d7176cdddeb546d).[advertiseService](../../../api/roscpp/html/classros_1_1NodeHandle.html#ae659319707eb40e8ef302763f7d632da)(get_world_properties_aso);
    00437
    00438       // Advertise more services on the custom queue
    00439       std::string get_joint_properties_service_name("get_joint_properties");
    00440       [ros::AdvertiseServiceOptions](../../../api/roscpp/html/structros_1_1AdvertiseServiceOptions.html) get_joint_properties_aso = ros::AdvertiseServiceOptions::create<gazebo_msgs::GetJointProperties>(
    00441           get_joint_properties_service_name,boost::bind(&[GazeboROSNode::getJointProperties](classGazeboROSNode.html#ab7dd403d73c7ee859edbcc889d9a88fd),this,_1,_2),
    00442           ros::VoidPtr(), &this->[gazebo_queue_](classGazeboROSNode.html#aaad18c9d54a8736ea6337821de03889a));
    00443       [get_joint_properties_service_](classGazeboROSNode.html#a290bee43c2217b9d1a38702770fae0c8) = this->[rosnode_](classGazeboROSNode.html#ae9011736edb2ec542d7176cdddeb546d).[advertiseService](../../../api/roscpp/html/classros_1_1NodeHandle.html#ae659319707eb40e8ef302763f7d632da)(get_joint_properties_aso);
    00444
    00445       // Advertise more services on the custom queue
    00446       std::string get_link_properties_service_name("get_link_properties");
    00447       [ros::AdvertiseServiceOptions](../../../api/roscpp/html/structros_1_1AdvertiseServiceOptions.html) get_link_properties_aso = ros::AdvertiseServiceOptions::create<gazebo_msgs::GetLinkProperties>(


  * [ Notifications ](/login?return_to=%2Fros-simulation%2Fgazebo_ros_pkgs)
  * [ Fork  761  ](/login?return_to=%2Fros-simulation%2Fgazebo_ros_pkgs)
  * [ Star  721  ](/login?return_to=%2Fros-simulation%2Fgazebo_ros_pkgs)


* Within the same ` MYROBOT_description/launch ` folder, edit the MYROBOT.world file with the following contents:


July 27, 2023, 9:41 am


[ ](javascript:; "Share Article") [
](//www.rssing.com/contact.php?r=o6&u=%2F%2Fgazebo214.rssing.com%2Fchan-57893035%2Flatest-
article19-live.php "Article Support")


[ Remove ADS ](//www.rssing.com/account.php?r=27)


Sorry, something went wrong.


You can’t perform that action at this time.


    00568         ros::VoidPtr(), &this->[gazebo_queue_](classGazeboROSNode.html#aaad18c9d54a8736ea6337821de03889a));
    00569       [set_link_state_topic_](classGazeboROSNode.html#a498ffe7e5679a42ce7fbba55ebf7746f) = this->[rosnode_](classGazeboROSNode.html#ae9011736edb2ec542d7176cdddeb546d).[subscribe](../../../api/roscpp/html/classros_1_1NodeHandle.html#a3b8e4b07d397119cd5c5e4439b170cbc)(link_state_so);
    00570
    00571       // topic callback version for set_model_state
    00572       [ros::SubscribeOptions](../../../api/roscpp/html/structros_1_1SubscribeOptions.html) model_state_so = ros::SubscribeOptions::create<gazebo_msgs::ModelState>(
    00573         "set_model_state",10, boost::bind( &[GazeboROSNode::updateModelState](classGazeboROSNode.html#a73523a3c37f0cc5d970d51cc78b38cfd),this,_1),
    00574         ros::VoidPtr(), &this->[gazebo_queue_](classGazeboROSNode.html#aaad18c9d54a8736ea6337821de03889a));
    00575       [set_model_state_topic_](classGazeboROSNode.html#a4acfb9bd33579d8fe776a7c516baaec9) = this->[rosnode_](classGazeboROSNode.html#ae9011736edb2ec542d7176cdddeb546d).[subscribe](../../../api/roscpp/html/classros_1_1NodeHandle.html#a3b8e4b07d397119cd5c5e4439b170cbc)(model_state_so);
    00576
    00577       // publish clock for simulated ros time
    00578       [pub_clock_](classGazeboROSNode.html#aed02a543ac7934fc64049963e08fe30f) = this->[rosnode_](classGazeboROSNode.html#ae9011736edb2ec542d7176cdddeb546d).[advertise](../../../api/roscpp/html/classros_1_1NodeHandle.html#a68232c46583059c8f7d948b154689e4c)<rosgraph_msgs::Clock>("/clock",10);
    00579
    00580       // publish complete link states in world frame
    00581       [ros::AdvertiseOptions](../../../api/roscpp/html/structros_1_1AdvertiseOptions.html) pub_link_states_ao = ros::AdvertiseOptions::create<gazebo_msgs::LinkStates>(
    00582         "link_states",10,
    00583         boost::bind(&[GazeboROSNode::onLinkStatesConnect](classGazeboROSNode.html#a9c086eaf15bf91f160990d761845f7dd),this),
    00584         boost::bind(&[GazeboROSNode::onLinkStatesDisconnect](classGazeboROSNode.html#a6574b2aebfd496f2884e34c45fa27926),this), ros::VoidPtr(), &this->[gazebo_queue_](classGazeboROSNode.html#aaad18c9d54a8736ea6337821de03889a));
    00585       [pub_link_states_](classGazeboROSNode.html#ac591a7b9378b025c5acd7b53a59e87b5) = this->[rosnode_](classGazeboROSNode.html#ae9011736edb2ec542d7176cdddeb546d).[advertise](../../../api/roscpp/html/classros_1_1NodeHandle.html#a68232c46583059c8f7d948b154689e4c)(pub_link_states_ao);
    00586
    00587       // publish complete model states in world frame
    00588       [ros::AdvertiseOptions](../../../api/roscpp/html/structros_1_1AdvertiseOptions.html) pub_model_states_ao = ros::AdvertiseOptions::create<gazebo_msgs::ModelStates>(
    00589         "model_states",10,
    00590         boost::bind(&[GazeboROSNode::onModelStatesConnect](classGazeboROSNode.html#a55b6baafd9670e2d80866b97fe4a0623),this),
    00591         boost::bind(&[GazeboROSNode::onModelStatesDisconnect](classGazeboROSNode.html#a15ae648d7bede494570b980d7135226b),this), ros::VoidPtr(), &this->[gazebo_queue_](classGazeboROSNode.html#aaad18c9d54a8736ea6337821de03889a));
    00592       [pub_model_states_](classGazeboROSNode.html#a9956d9b0ba56fa9ae7910588c22931e0) = this->[rosnode_](classGazeboROSNode.html#ae9011736edb2ec542d7176cdddeb546d).[advertise](../../../api/roscpp/html/classros_1_1NodeHandle.html#a68232c46583059c8f7d948b154689e4c)(pub_model_states_ao);
    00593
    00594
    00595
    00596
    00597
    00598       // set param for use_sim_time if not set by user alread
    00599       this->[rosnode_](classGazeboROSNode.html#ae9011736edb2ec542d7176cdddeb546d).[setParam](../../../api/roscpp/html/classros_1_1NodeHandle.html#a97a2bc0564bba26ab07f0a2c0333c725)("/use_sim_time", true);
    00600
    00601       // todo: contemplate setting environment variable ROBOT=sim here???
    00602     }
    00603
    [00604](classGazeboROSNode.html#a9c086eaf15bf91f160990d761845f7dd)     void [onLinkStatesConnect](classGazeboROSNode.html#a9c086eaf15bf91f160990d761845f7dd)()
    00605     {
    00606       this->[pub_link_states_connection_count_](classGazeboROSNode.html#ac131709cfe171cca7a556620a9180d56)++;
    00607       if (this->[pub_link_states_connection_count_](classGazeboROSNode.html#ac131709cfe171cca7a556620a9180d56) == 1) // connect on first subscriber


    00775           model->RemoveChild(rpy_key);
    00776
    00777         xyz_key = new TiXmlElement("xyz");
    00778         rpy_key = new TiXmlElement("rpy");
    00779
    00780         std::ostringstream xyz_stream, rpy_stream;
    00781         xyz_stream << initial_xyz.x << " " << initial_xyz.y << " " << initial_xyz.z;
    00782         gazebo::Vector3 initial_rpy = initial_q.GetAsEuler(); // convert to Euler angles for Gazebo XML
    00783         rpy_stream << initial_rpy.x*180.0/M_PI << " " << initial_rpy.y*180.0/M_PI << " " << initial_rpy.z*180.0/M_PI; // convert to degrees for Gazebo (though ROS is in Radians)
    00784
    00785
    00786         TiXmlText* xyz_txt = new TiXmlText(xyz_stream.str());
    00787         TiXmlText* rpy_txt = new TiXmlText(rpy_stream.str());
    00788
    00789         xyz_key->LinkEndChild(xyz_txt);
    00790         rpy_key->LinkEndChild(rpy_txt);
    00791
    00792         model->LinkEndChild(xyz_key);
    00793         model->LinkEndChild(rpy_key);
    00794
    00795         // replace model name if one is specified by the user
    00796         model->RemoveAttribute("name");
    00797         model->SetAttribute("name",model_name);
    00798
    00799       }
    00800
    00801       // push to factory iface
    00802       std::ostringstream stream;
    00803       stream << gazebo_model_xml;
    00804       std::string gazebo_model_xml_string = stream.str();
    00805       [ROS_DEBUG](../../../api/rosconsole/html/macros__generated_8h.html#a83228c0b42c80605abdd0f42af64b1f7)("Gazebo Model XML\n\n%s\n\n ",gazebo_model_xml_string.c_str());
    00806
    00807       // Add the new models into the World
    00808       std::string xmlMiddle = gazebo_model_xml_string;
    00809       // Strip leading <?xml...?> tag, if present, to allow the client to
    00810       // pass the contents of a valid .model file
    00811       std::string xmlVersion = "<?xml version=\"1.0\"?>";
    00812       int [i](../../../api/ivcon/html/ivcon_8c.html#acb559820d9ca11295b4500f179ef6392) = xmlMiddle.find(xmlVersion);
    00813       if(i >= 0) xmlMiddle.replace(i, xmlVersion.length(), "");
    00814       // insert entity into a queue for gazebo to process


[ ![@hsu](https://avatars.githubusercontent.com/u/138109?s=40&v=4) ](/hsu)


#  [ [gazebo-1]; process has died [pid 3631, exit code 139
](//gazebo214.rssing.com/chan-57893035/latest-article11-live.php)


[ _≫_ Next: help for installing lidar on a drone
](//gazebo214.rssing.com/chan-57893035/latest.php#c57893035a6942 "Next
Article")


main window [GUI] [Msg] Loaded plugin [VisualizationCapabilities] from path
[/usr/lib/x86_64-linux-gnu/ign-
gazebo-6/plugins/gui/libVisualizationCapabilities.so] [GUI] [Dbg]
[Application.cc:426] Loading plugin [WorldControl] [GUI] [Wrn]
[Application.cc:797] [QT] file::/WorldControl/WorldControl.qml:30:3: QML
Connections: Implicitly defined onFoo properties in Connections are
deprecated. Use this syntax instead: function onFoo(  ) { ... } [GUI] [Msg]
Using world control service [/world/default/control] [GUI] [Msg] Listening to
stats on [/world/default/stats] [GUI] [Dbg] [WorldControl.cc:246] Using an
event to share WorldControl msgs with the server [GUI] [Msg] Added plugin
[World control] to main window [GUI] [Msg] Loaded plugin [WorldControl] from
path [/usr/lib/x86_64-linux-gnu/ign-gui-6/plugins/libWorldControl.so] [GUI]
[Dbg] [Application.cc:426] Loading plugin [WorldStats] [GUI] [Msg] Listening
to stats on [/world/default/stats] [GUI] [Msg] Added plugin [World stats] to
main window [GUI] [Msg] Loaded plugin [WorldStats] from path
[/usr/lib/x86_64-linux-gnu/ign-gui-6/plugins/libWorldStats.so] [GUI] [Dbg]
[Application.cc:426] Loading plugin [Shapes] [GUI] [Msg] Added plugin [Shapes]
to main window [GUI] [Msg] Loaded plugin [Shapes] from path
[/usr/lib/x86_64-linux-gnu/ign-gazebo-6/plugins/gui/libShapes.so] [GUI] [Dbg]
[Application.cc:426] Loading plugin [Lights] [GUI] [Msg] Added plugin [Lights]
to main window [GUI] [Msg] Loaded plugin [Lights] from path
[/usr/lib/x86_64-linux-gnu/ign-gazebo-6/plugins/gui/libLights.so] [GUI] [Dbg]
[Application.cc:426] Loading plugin [TransformControl] [GUI] [Wrn]
[Application.cc:797] [QT] file::/TransformControl/TransformControl.qml:104:3:
QML Connections: Implicitly defined onFoo properties in Connections are
deprecated. Use this syntax instead: function onFoo(  ) { ... } [GUI] [Wrn]
[Application.cc:797] [QT] file::/TransformControl/TransformControl.qml:99:3:
QML Connections: Implicitly defined onFoo properties in Connections are
deprecated. Use this syntax instead: function onFoo(  ) { ... } [GUI] [Wrn]
[Application.cc:797] [QT] file::/TransformControl/TransformControl.qml:94:3:
QML Connections: Implicitly defined onFoo properties in Connections are
deprecated. Use this syntax instead: function onFoo(  ) { ... } [GUI] [Wrn]
[Application.cc:797] [QT] file::/TransformControl/TransformControl.qml:89:3:
QML Connections: Implicitly defined onFoo properties in Connections are
deprecated. Use this syntax instead: function onFoo(  ) { ... } [GUI] [Dbg]
[TransformControl.cc:219] Legacy mode is disabled; this plugin must be used
with MinimalScene. [GUI] [Msg] Added plugin [Transform control] to main window
[GUI] [Msg] Loaded plugin [TransformControl] from path [/usr/lib/x86_64-linux-
gnu/ign-gazebo-6/plugins/gui/libTransformControl.so] [GUI] [Dbg]
[Application.cc:426] Loading plugin [Screenshot] [GUI] [Msg] Screenshot


Hi, I am trying to create a sdf file for two wheel robot. I can see in gazebo
window that my model is vibrating constantly, When I only run the base or
wheel alone they don't vibrate. I am sharing my sdf and launch file, Any help
would be much appreciated.  0 0 0 0 0 0  0.1 0.2 0.05  0.1 0.2 0.05  0 0.12
-0.025 1.5707 0 0  0.05  0.02  0.05  0.02  0 -0.12 -0.025 1.5707 0 0  0.05
0.02  W  0.05  0.02  base_link  left_wheel  0 1 0  -3.14  3.14  base_link
right_wheel  0 1 0  -3.14  3.14  This is my world file  model://sun
model://ground_plane  1000.0  0.01  model://my1stmodel


###  [ Frequency Adverbs
](////adverbs45.rssing.com/chan-14763103/article227.html#c14763103a227i286089440)


[ ↂ
](////learn4804.rssing.com/chan-65098560/article5043.html#c65098560a5043i329832300
"Class 10 Sanskrit Grammar Book Solutions अपठित-अवबोधनम्")


    $ rosparam load `rospack find baxter_description`/urdf/baxter.urdf /robot_description
    ...
    yaml.scanner.ScannerError: mapping values are not allowed here
      in "<string>", line 34, column 14:
            <!-- note: invisible -->
                     ^


    01786           gazebo::Joint* joint = model->GetJoint([i](../../../api/ivcon/html/ivcon_8c.html#acb559820d9ca11295b4500f179ef6392));
    01787           // recurse through children connected by joints
    01788           gazebo::Body* body0 = [getParentBody](classGazeboROSNode.html#a6cdfd1e109477950bf6e002efaf1f96d)(joint);
    01789           gazebo::Body* body1 = [getChildBody](classGazeboROSNode.html#a9d9585eb5e1a40f4d26683e5ba110267)(joint);
    01790           if (body0 && body1
    01791               && body0->GetName() != body1->GetName()
    01792               && body1->GetName() == body->GetName()
    01793               && body0->GetName() != orig_parent_body->GetName()
    01794               && ![inBodies](classGazeboROSNode.html#ae92990dde0739ce2c0dba88b653ab4d2)(body0,bodies))
    01795           {
    01796             bodies.push_back(body0);
    01797             [getAllParentBodies](classGazeboROSNode.html#a267d19e1c7024d3711a3cced5fbc4ce7)(bodies, body0->GetModel(), body1, orig_parent_body);
    01798           }
    01799         }
    01800       }
    01801     }
    01802
    [01803](classGazeboROSNode.html#ae92990dde0739ce2c0dba88b653ab4d2)     bool [inBodies](classGazeboROSNode.html#ae92990dde0739ce2c0dba88b653ab4d2)(gazebo::Body* body,std::vector<gazebo::Body*> bodies)
    01804     {
    01805       for (std::vector<gazebo::Body*>::iterator bit = bodies.begin(); bit != bodies.end(); bit++)
    01806         if ((*bit)->GetName() == body->GetName()) return true;
    01807       return false;
    01808     }
    01809
    [01810](classGazeboROSNode.html#a8baef56eaa181b6f78eb88dbefe9fa5a)     bool [findJointPosition](classGazeboROSNode.html#a8baef56eaa181b6f78eb88dbefe9fa5a)(double &position, std::string name, std::vector<std::string> joint_names, std::vector<double> joint_positions)
    01811     {
    01812       position = 0;
    01813       std::vector<std::string>::iterator jit = joint_names.begin();
    01814       std::vector<double>::iterator pit = joint_positions.begin();
    01815       for(;jit != joint_names.end(),pit != joint_positions.end(); jit++,pit++)
    01816       {
    01817         if (name == (*jit))
    01818         {
    01819           position = (*pit);
    01820           return true;
    01821         }
    01822       }
    01823       return false;
    01824     }
    01825


    01584             // found one, search through again
    01585             search = true;
    01586             delete (*iter);
    01587             this->[wrench_body_jobs](classGazeboROSNode.html#ade2831b1970d2ceed871e82a9140c2bb).erase(iter);
    01588             break;
    01589           }
    01590         }
    01591       }
    01592       this->[lock_](classGazeboROSNode.html#a3895043c9355e3e2a23f84efe0060736 "A mutex to lock access to fields that are used in ROS message callbacks.").unlock();
    01593       return true;
    01594     }
    01595
    [01598](classGazeboROSNode.html#aeec9ad42d7c0628cc49d6d886b8a377d)     bool [setModelConfiguration](classGazeboROSNode.html#aeec9ad42d7c0628cc49d6d886b8a377d)([gazebo_msgs::SetModelConfiguration::Request](../../gazebo_msgs/html/structgazebo__msgs_1_1SetModelConfigurationRequest__.html) &req,[gazebo_msgs::SetModelConfiguration::Response](../../gazebo_msgs/html/structgazebo__msgs_1_1SetModelConfigurationResponse__.html) &res)
    01599     {
    01600       std::string gazebo_model_name = req.[model_name](../../gazebo_msgs/html/structgazebo__msgs_1_1SetModelConfigurationRequest__.html#a0ee5962a9eb9e10922d0371b7025b1ee);
    01601
    01602       // search for model with name
    01603       gazebo::Model* gazebo_model = dynamic_cast<gazebo::Model*>(gazebo::World::Instance()->GetEntityByName(gazebo_model_name));
    01604       if (gazebo_model == NULL)
    01605       {
    01606         [ROS_ERROR](../../../api/rosconsole/html/macros__generated_8h.html#a7fb635b03cc608284eadecd2f8becd9a)("SetModelConfiguration: model [%s] does not exist",gazebo_model_name.c_str());
    01607         res.[success](../../gazebo_msgs/html/structgazebo__msgs_1_1SetModelConfigurationResponse__.html#a8c206095119a86b72a7de6b3ab740cdc) = false;
    01608         res.[status_message](../../gazebo_msgs/html/structgazebo__msgs_1_1SetModelConfigurationResponse__.html#a2fdb8a5a8cf73b4b360782c4e7dfbf38) = "SetModelConfiguration: model does not exist";
    01609         return false;
    01610       }
    01611
    01612       // make the service call to pause gazebo
    01613       bool is_paused = gazebo::Simulator::Instance()->IsPaused();
    01614       if (!is_paused) gazebo::Simulator::Instance()->SetPaused(true);
    01615
    01616       [setModelJointPositions](classGazeboROSNode.html#a131c45793b70f3fa421701a96ddaa84b)(gazebo_model,req.[joint_names](../../gazebo_msgs/html/structgazebo__msgs_1_1SetModelConfigurationRequest__.html#a974d7f7fa3f97c132c47bf9fa54e82a1),req.[joint_positions](../../gazebo_msgs/html/structgazebo__msgs_1_1SetModelConfigurationRequest__.html#a4a6ed8cc19d958c191729f7e9eb4eaaf));
    01617
    01618       // resume paused state before this call
    01619       gazebo::Simulator::Instance()->SetPaused(is_paused);
    01620
    01621       res.[success](../../gazebo_msgs/html/structgazebo__msgs_1_1SetModelConfigurationResponse__.html#a8c206095119a86b72a7de6b3ab740cdc) = true;
    01622       res.[status_message](../../gazebo_msgs/html/structgazebo__msgs_1_1SetModelConfigurationResponse__.html#a2fdb8a5a8cf73b4b360782c4e7dfbf38) = "SetModelConfiguration: success";
    01623       return true;
    01624     }
    01625


[ ![@hsu](https://avatars.githubusercontent.com/u/138109?s=80&v=4) ](/hsu)


    00001 /*
    00002  *  Gazebo - Outdoor Multi-Robot Simulator
    00003  *  Copyright (C) 2003
    00004  *     Nate Koenig & Andrew Howard
    00005  *
    00006  *  This program is free software; you can redistribute it and/or modify
    00007  *  it under the terms of the GNU General Public License as published by
    00008  *  the Free Software Foundation; either version 2 of the License, or
    00009  *  (at your option) any later version.
    00010  *
    00011  *  This program is distributed in the hope that it will be useful,
    00012  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    00013  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    00014  *  GNU General Public License for more details.
    00015  *
    00016  *  You should have received a copy of the GNU General Public License
    00017  *  along with this program; if not, write to the Free Software
    00018  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    00019  *
    00020  */
    00021
    00022 /* Desc: External interfaces for Gazebo
    00023  * Author: John Hsu adapted original gazebo main.cc by Nate Koenig
    00024  * Date: 25 Apr 2010
    00025  * SVN: $Id: main.cc 8598 2010-03-22 21:59:24Z hsujohnhsu $
    00026  */
    00027
    00028 #include <stdio.h>
    00029 #include <stdlib.h>
    00030 #include <signal.h>
    00031 #include <errno.h>
    00032 #include <iostream>
    00033
    00034 // urdf utilities
    00035 #include <[tinyxml.h](../../../api/rospack/html/tinyxml_8h.html)>
    00036 #include <[gazebo/urdf2gazebo.h](urdf2gazebo_8h.html)>
    00037
    00038 #include "gazebo/gazebo.h"


[ ](javascript:; "Ouch") 0


Sorry, something went wrong.


[ ![@jbohren](https://avatars.githubusercontent.com/u/1253450?s=40&v=4)
](/jbohren)


####  Viewing In Gazebo - ` roslaunch ` with the Model Database


[ _≪_ Previous: How to generate a 3D occupancy map for a Gazebo world
](//gazebo214.rssing.com/chan-57893035/latest.php#c57893035a6930 "Previous
Article")


**Have a question about this project?** Sign up for a free GitHub account to
open an issue and contact its maintainers and the community.


#  Tutorial: Using roslaunch to start Gazebo, world files and URDF models


[ jbohren ](/jbohren) pushed a commit to jhu-lcsr-forks/gazebo_ros_pkgs that
referenced this issue  Oct 21, 2014


[ ](//www.rssing.com/index.php?zw=2123 "Home") [ $ ](javascript:; "MoMoney")


[ ![@jbohren](https://avatars.githubusercontent.com/u/1253450?s=80&v=4)
](/jbohren)


* You should now be able to launch your custom world (with a gas station) into Gazebo using the following command:


**[ fmessmer ](/fmessmer) ** commented  Sep 17, 2014


##  Using ` roslaunch ` to Spawn URDF Robots


[ ](javascript:; "Like") 0


👍  2  josephcoombe and rcywongaa reacted with thumbs up emoji


Copy link


Search or jump to...


` [ 99b9dc5 ](/ros-
simulation/gazebo_ros_pkgs/commit/99b9dc598413ab37f6d5f7e67b005f195d88ccdc) `


[ ![@dpsolomon](https://avatars.githubusercontent.com/u/4515469?s=80&v=4)
](/dpsolomon)


    02370     {
    02371       if (this->[lastForceJointUpdateTime](classGazeboROSNode.html#a05911ae1da87d03e4cd777417ee7ad89) == gazebo::Simulator::Instance()->GetSimTime().Double())
    02372         return;
    02373       // MDMutex locks in case model is getting deleted, don't have to do this if we delete jobs first
    02374       // boost::recursive_mutex::scoped_lock lock(*gazebo::Simulator::Instance()->GetMDMutex());
    02375       this->[lock_](classGazeboROSNode.html#a3895043c9355e3e2a23f84efe0060736 "A mutex to lock access to fields that are used in ROS message callbacks.").lock();
    02376       for (std::vector<GazeboROSNode::ForceJointJob*>::iterator iter=this->[force_joint_jobs](classGazeboROSNode.html#a22ab41eec754d289d8c56f05045f480e).begin();iter!=this->[force_joint_jobs](classGazeboROSNode.html#a22ab41eec754d289d8c56f05045f480e).end();)
    02377       {
    02378         // check times and apply force if necessary
    02379         if ([ros::Time](../../../api/rostime/html/classros_1_1Time.html)(gazebo::Simulator::Instance()->GetSimTime().Double()) >= (*iter)->start_time)
    02380           if ([ros::Time](../../../api/rostime/html/classros_1_1Time.html)(gazebo::Simulator::Instance()->GetSimTime().Double()) <= (*iter)->start_time+(*iter)->duration ||
    02381               (*iter)->duration.toSec() < 0.0)
    02382             {
    02383               if ((*iter)->joint) // if joint exists
    02384                 (*iter)->joint->SetForce(0,(*iter)->force);
    02385               else
    02386                 (*iter)->duration.fromSec(0.0); // mark for delete
    02387             }
    02388
    02389         if ([ros::Time](../../../api/rostime/html/classros_1_1Time.html)(gazebo::Simulator::Instance()->GetSimTime().Double()) > (*iter)->start_time+(*iter)->duration &&
    02390             (*iter)->duration.toSec() >= 0.0)
    02391         {
    02392           // remove from queue once expires
    02393           this->[force_joint_jobs](classGazeboROSNode.html#a22ab41eec754d289d8c56f05045f480e).erase(iter);
    02394         }
    02395         else
    02396           iter++;
    02397       }
    02398       this->[lastForceJointUpdateTime](classGazeboROSNode.html#a05911ae1da87d03e4cd777417ee7ad89) = gazebo::Simulator::Instance()->GetSimTime().Double();
    02399       this->[lock_](classGazeboROSNode.html#a3895043c9355e3e2a23f84efe0060736 "A mutex to lock access to fields that are used in ROS message callbacks.").unlock();
    02400     }
    02401
    [02404](classGazeboROSNode.html#a48733f4c02ab9c9976653dfd37c89e34)     void [publishSimTime](classGazeboROSNode.html#a48733f4c02ab9c9976653dfd37c89e34)()
    02405     {
    02406       gazebo::Time currentTime = gazebo::Simulator::Instance()->GetSimTime();
    02407       rosgraph_msgs::Clock ros_time_;
    02408       ros_time_.clock.fromSec(currentTime.Double());
    02409       /***************************************************************/
    02410       /*                                                             */
    02411       /*  publish time to ros                                        */


![Meet Peter Nygard Girlfriends &
Children](//dailyentertainmentnews.com/wpgo/wp-content/uploads/2020/02/kai-
nygard-184x300.jpg)


[
![@fmessmer](https://avatars.githubusercontent.com/u/508006?s=80&u=34cff5e25c579c359ad4f4b566fbc425f1b353e5&v=4)
](/fmessmer)


####  URDF Example with Baxter


    01023         for (unsigned int [i](../../../api/ivcon/html/ivcon_8c.html#acb559820d9ca11295b4500f179ef6392) = 0; [i](../../../api/ivcon/html/ivcon_8c.html#acb559820d9ca11295b4500f179ef6392) < jc ; [i](../../../api/ivcon/html/ivcon_8c.html#acb559820d9ca11295b4500f179ef6392)++)
    01024           res.[joint_names](../../gazebo_msgs/html/structgazebo__msgs_1_1GetModelPropertiesResponse__.html#a4e1a0730644ed5ac3f765b40007ee586).push_back( model->GetJoint([i](../../../api/ivcon/html/ivcon_8c.html#acb559820d9ca11295b4500f179ef6392))->GetName() );
    01025
    01026         // get children model names
    01027         res.[child_model_names](../../gazebo_msgs/html/structgazebo__msgs_1_1GetModelPropertiesResponse__.html#adf217ea42ae5f370b1efb3f010978b19).clear();
    01028         const std::vector< gazebo::Entity* > children = model->GetChildren();
    01029         for (std::vector< gazebo::Entity* >::const_iterator citer = children.begin(); citer != children.end();  citer++)
    01030           res.[child_model_names](../../gazebo_msgs/html/structgazebo__msgs_1_1GetModelPropertiesResponse__.html#adf217ea42ae5f370b1efb3f010978b19).push_back((*citer)->GetName() );
    01031
    01032         // is model static
    01033         res.[is_static](../../gazebo_msgs/html/structgazebo__msgs_1_1GetModelPropertiesResponse__.html#a09a8e0211965578f8ee0a46ecb89e1c8) = model->IsStatic();
    01034
    01035         res.[success](../../gazebo_msgs/html/structgazebo__msgs_1_1GetModelPropertiesResponse__.html#a37b00b8f7dff2d63ad76237f5d8df7eb) = true;
    01036         res.[status_message](../../gazebo_msgs/html/structgazebo__msgs_1_1GetModelPropertiesResponse__.html#a2cf1722eb607280ff503bd5c78d51fd0) = "GetModelProperties: got properties";
    01037         return true;
    01038       }
    01039     }
    01040
    [01043](classGazeboROSNode.html#ab485ea3ca05e68dd963edcdb64b99636)     bool [getWorldProperties](classGazeboROSNode.html#ab485ea3ca05e68dd963edcdb64b99636)([gazebo_msgs::GetWorldProperties::Request](../../gazebo_msgs/html/structgazebo__msgs_1_1GetWorldPropertiesRequest__.html) &req,[gazebo_msgs::GetWorldProperties::Response](../../gazebo_msgs/html/structgazebo__msgs_1_1GetWorldPropertiesResponse__.html) &res)
    01044     {
    01045       res.[sim_time](../../gazebo_msgs/html/structgazebo__msgs_1_1GetWorldPropertiesResponse__.html#a2ce1cbb782c518b4f003d7d99ebd9e51) = gazebo::Simulator::Instance()->GetSimTime().Double();
    01046       res.[model_names](../../gazebo_msgs/html/structgazebo__msgs_1_1GetWorldPropertiesResponse__.html#a9e81c59dd13728277a683f49303da8ab).clear();
    01047       const std::vector<gazebo::Model*> models = gazebo::World::Instance()->GetModels();
    01048       for (std::vector<gazebo::Model*>::const_iterator miter = models.begin(); miter != models.end(); miter++)
    01049         res.[model_names](../../gazebo_msgs/html/structgazebo__msgs_1_1GetWorldPropertiesResponse__.html#a9e81c59dd13728277a683f49303da8ab).push_back((*miter)->GetName());
    01050       res.[rendering_enabled](../../gazebo_msgs/html/structgazebo__msgs_1_1GetWorldPropertiesResponse__.html#a5de0a651c6f53e8b837556cf0a8cfd81) = gazebo::Simulator::Instance()->GetRenderEngineEnabled();
    01051       res.[success](../../gazebo_msgs/html/structgazebo__msgs_1_1GetWorldPropertiesResponse__.html#ace70c251ad884e343194f7572f7fe4fa) = true;
    01052       res.[status_message](../../gazebo_msgs/html/structgazebo__msgs_1_1GetWorldPropertiesResponse__.html#ae1c9f7df7afc82524052e564f885e7a2) = "GetWorldProperties: got properties";
    01053
    01054       return true;
    01055     }
    01056
    [01059](classGazeboROSNode.html#ab7dd403d73c7ee859edbcc889d9a88fd)     bool [getJointProperties](classGazeboROSNode.html#ab7dd403d73c7ee859edbcc889d9a88fd)([gazebo_msgs::GetJointProperties::Request](../../gazebo_msgs/html/structgazebo__msgs_1_1GetJointPropertiesRequest__.html) &req,[gazebo_msgs::GetJointProperties::Response](../../gazebo_msgs/html/structgazebo__msgs_1_1GetJointPropertiesResponse__.html) &res)
    01060     {
    01061       gazebo::Joint* joint = NULL;
    01062       const std::vector<gazebo::Model*> models = gazebo::World::Instance()->GetModels();
    01063       for (std::vector<gazebo::Model*>::const_iterator miter = models.begin(); miter != models.end(); miter++)
    01064       {
    01065         joint = (*miter)->GetJoint(req.[joint_name](../../gazebo_msgs/html/structgazebo__msgs_1_1GetJointPropertiesRequest__.html#a1844152d6bf73bdbd82d30b4bde899ca));
    01066         if (joint) break;


When trying to include a contact sensor plugin, the plugin only publishes the
contact positions but does not publish contact wrenches or depth. This is also
the case when you run the
[`visualize_contacts.sdf`](https://github.com/gazebosim/gz-
sim/blob/e749020e1ea5cbd4a07a9f22438eb01ec3ee1b01/examples/worlds/visualize_contacts.sdf)
example. E.g. when running the example and echoing the topic via gz topic -e
-t
world/visualize_contacts/model/cylinder/link/link/sensor/contact_sensor/contact
The results only show the positions and not force or depth. Is this the
intended behavior? And if yes how do I optain the actual contact forces and/or
contact depths?


[ ](javascript:;)


Open


August 7, 2023, 3:20 am


Name


[ ](javascript:; "Share Article") [
](//www.rssing.com/contact.php?r=o6&u=%2F%2Fgazebo214.rssing.com%2Fchan-57893035%2Flatest-
article24-live.php "Article Support")


You signed in with another tab or window. [ Reload ]() to refresh your
session.  You signed out in another tab or window. [ Reload ]() to refresh
your session.  You switched accounts on another tab or window. [ Reload ]() to
refresh your session.  Dismiss alert


Before continuing on how to spawn robots into Gazebo, we will first go over
file hierarchy standards for using ROS with Gazebo so that we can make later
assumptions.


Hi, i created a robot model with some links. All links are meshes, like the
UR10 from Universal Robotics has its shoulder_link, elbow_link and so on. For
example the simulation for the UR-10 uses the meshes as collision elements.
How much would it improve the speed of our simulation to improve the meshes
(ex the base from 300 faces to 50 faces). Is there a rule for a good number of
faces for collision meshes or is it mostly better to use simple shapes? What
is the most common way for collision objects in Gazebos simulations? What are
"good" meshes? And how would it improve the simulation to improve all meshes
(to let me say 50% of all faces as example) Is the number of faces of the
visual mesh influencing the simulation-performance? Best regards Max


[ ![@m-talha](https://avatars.githubusercontent.com/u/15839351?s=80&v=4)
](/m-talha)


[ ](javascript:; "Ouch") 0


August 10, 2023, 2:43 pm


-J command not working in Gazebo 9 and ros melodic

---

All reactions


###  [ Have you seen Michael Wines? Burien man has been missing since
Saturday,...
](////normandy480.rssing.com/chan-74604448/article56.html#c74604448a56i1857302427)


Sorry, something went wrong.


July 30, 2023, 11:13 am


###  [ First Pictures of the Eclipse ! ! !
](////political6691.rssing.com/chan-78391714/article69.html#c78391714a69i1437484910)


#  spawn_model -J initial joint positions not working  #93


    00160   fprintf(stderr, "  <worldfile>   : load the the indicated world file\n");
    00161   ros::shutdown();
    00162   return;
    00163 }
    00164
    00166 // Print the version/licence string
    [00167](gazeboros_8cpp.html#a1fae5968f70747445d63f63065fb7ef3) void [PrintVersion](gazeboros_8cpp.html#a1fae5968f70747445d63f63065fb7ef3)()
    00168 {
    00169   fprintf(stderr, "Gazebo multi-robot simulator, version %s\n\n", GAZEBO_VERSION);
    00170   fprintf(stderr, "Part of the Player/Stage Project "
    00171           "[http://playerstage.sourceforge.net].\n");
    00172   fprintf(stderr, "Copyright (C) 2003 Nate Koenig, Andrew Howard, and contributors.\n");
    00173   fprintf(stderr, "Released under the GNU General Public License.\n\n");
    00174   return;
    00175 }
    00176
    00178 // Parse the argument list.  Options are placed in static variables.
    [00179](gazeboros_8cpp.html#ad9679efc026cf00079540edae2daf96e) int [ParseArgs](gazeboros_8cpp.html#ad9679efc026cf00079540edae2daf96e)(int argc, char **argv)
    00180 {
    00181   int ch;
    00182   char *flags = (char*)("lw:hd:s:fgxt:nqperuo");
    00183
    00184   // Get letter options
    00185   while ((ch = getopt(argc, argv, flags)) != -1)
    00186   {
    00187     switch (ch)
    00188     {
    00189       case 'o':
    00190         [optOgreLog](gazeboros_8cpp.html#a511ffb65b36a4472dbfdbd6e3139f032) = true;
    00191         break;
    00192
    00193       case 'u':
    00194         [optPaused](gazeboros_8cpp.html#a3697e95c8066e4952f3881c731f9e731) = true;
    00195         break;
    00196
    00197       case 'd':
    00198         // Verbose mode
    00199         [optMsgLevel](gazeboros_8cpp.html#a0fb92fe3e724133ffc57d6d48aca3aa3) = atoi(optarg);
    00200         break;
    00201


Hello, I'm new to plugin development in Gazebo, i am trying to start an Actor
trajectory from a Plugin during simulation execution. I added a simple actor
in my world description (sdf file). Like this :  .2 .2 .2  This actor is
working well, but my needs is to start the trajectory from a plugin, in
PreUpdate function. For doing this i get the actor object from
EntityComponentManager like this : auto targetActorComponent =
_ecm.Component<:components::actor>( this->dataPtr->targetEntity)->Data(); And
i can access functions like : targetActorComponent.SetScriptDelayStart(0.0);
targetActorComponent.SetScriptLoop(true);
targetActorComponent.SetScriptAutoStart(true); But these does not affect the
trajectory of the actor at all. I also tried to reload the component after
making changes, but same result.
targetActorComponent.Load(targetActorComponent.Element()); I probably
misunderstood how this component works and how to modify its parameters. How
should I go about it? I couldn't find any examples. Thanks in advance


[ _≪_ Previous: Can I apply zero gravity on .urdf models?
](//gazebo214.rssing.com/chan-57893035/latest.php#c57893035a6933 "Previous
Article")


It looks like everything is fine up to [ https://github.com/ros-
simulation/gazebo_ros_pkgs/blob/indigo-
devel/gazebo_ros/src/gazebo_ros_api_plugin.cpp#L1472 ](https://github.com/ros-
simulation/gazebo_ros_pkgs/blob/indigo-
devel/gazebo_ros/src/gazebo_ros_api_plugin.cpp#L1472)
The ` -J ` arguments are handed over to ` joint_position_map ` correctly!

---

All reactions


July 28, 2023, 2:12 am


[ ![Very Hungry Caterpillar™ Shirt: World of Eric Carle™+ Little Goodall
by...](//i.etsystatic.com/6018612/r/il/7591e4/3868173454/il_570xN.3868173454_gxfr.jpg)
](////cryptomnesia.rssing.com/chan-1183730/article16627.html#c1183730a16627i1139077293)


rosrun gazebo_ros spawn_model -file `rospack find MYROBOT_description`/urdf/MYROBOT.urdf -urdf -x 0 -y 0 -z 1 -model MYROBOT


**[ mintar ](/mintar) ** commented  Jan 12, 2021


[
![@anubhav1772](https://avatars.githubusercontent.com/u/16475513?s=80&u=ace94db737376eb372988b8dcf541a2de68cc142&v=4)
](/anubhav1772)


[ ](javascript:; "Like") 0


[ ](javascript:; "Ouch") 0


[ ![@the-raspberry-pi-
guy](https://avatars.githubusercontent.com/u/5570173?s=80&u=c32744a19ef2b7158431c7a1948822887de75fa5&v=4)
](/the-raspberry-pi-guy)


[ _≫_ Next: How to add multiple HWSim instances in gazebo?
](//gazebo214.rssing.com/chan-57893035/latest.php#c57893035a6937 "Next
Article")


[ _≫_ Next: Cannot locate rosdep definition for gz-transport12 and gz-math7
after building Gazebo from source.
](//gazebo214.rssing.com/chan-57893035/latest.php#c57893035a6939 "Next
Article")


Copy link


###  [ Very Hungry Caterpillar™ Shirt: World of Eric Carle™+ Little Goodall
by...
](////cryptomnesia.rssing.com/chan-1183730/article16627.html#c1183730a16627i1139077293)


    <!-- Spawn a robot into Gazebo -->
    <node name="spawn_urdf" pkg="gazebo_ros" type="spawn_model" args="-file $(find baxter_description)/urdf/baxter.urdf -urdf -z 1 -model baxter" />


  * [ RSSing>> ](//www.rssing.com/index.php)
    * Collections:
    * [ RSSing ](//www.rssing.com/index.php)
    * [ EDA ](//www.rssing.com/d/eda/index.php)
    * [ Intel ](//www.rssing.com/d/intel/index.php)
    * [ Mesothelioma ](//www.rssing.com/d/mesothelioma/index.php)
    * [ SAP ](//www.rssing.com/d/sap/index.php)
    * [ SEO ](//www.rssing.com/d/seo/index.php)
  * [ Latest  ](//www.rssing.com/index.php?l=l)
    * [ Articles ](//www.rssing.com/index.php?l=la)
    * [ Channels ](//www.rssing.com/index.php?l=lc)
    * [ Super Channels ](//www.rssing.com/index.php?l=ls)
  * [ Popular  ](//www.rssing.com/index.php?l=p)
    * [ Articles ](//www.rssing.com/index.php?l=pa)
    * [ Pages ](//www.rssing.com/index.php?l=pp)
    * [ Channels ](//www.rssing.com/index.php?l=pc)
    * [ Super Channels ](//www.rssing.com/index.php?l=ps)
  * [ Top Rated  ](//www.rssing.com/index.php?l=r)
    * [ Articles ](//www.rssing.com/index.php?l=ra)
    * [ Pages ](//www.rssing.com/index.php?l=rp)
    * [ Channels ](//www.rssing.com/index.php?l=rc)
    * [ Super Channels ](//www.rssing.com/index.php?l=rs)
  * [ Trending  ](//www.rssing.com/index.php?l=t)
    * [ Articles ](//www.rssing.com/index.php?l=ta)
    * [ Pages ](//www.rssing.com/index.php?l=tp)
    * [ Channels ](//www.rssing.com/index.php?l=tc)
    * [ Super Channels ](//www.rssing.com/index.php?l=ts)


[ davetcoleman ](/davetcoleman) opened this issue  Jul 30, 2013  · 85 comments


###  "Model Database" Robot Spawn Method


I was going through
[this](https://classic.gazebosim.org/tutorials?tut=ros_roslaunch) tutorial on
Gazebo-classic & wasn't able to understand
[this](https://classic.gazebosim.org/tutorials?tut=ros_roslaunch#Exportingmodelpathsfromapackage.xml)
section. I thought the section meant that: by editing the package.xml in the
shown way (and sourcing the setup.bash of the catkin_ws containing the
MYROBOT_description package), the GAZEBO_MODEL_PATH env variable will be set
automatically instead of having to set it manually. But when I edited the
package.xml in the shown way & did catkin_make & sourced the setup.bash, the
GAZEBO_MODEL_PATH env variable is still not set. Can anyone please explain
this? Thanks! P.S: I'm using ROS Noetic.


[ Bring back -J option to specify joint angles when creating model
gazebosim/ros_gz#291  ](/gazebosim/ros_gz/issues/291)


Sorry, something went wrong.


[
![@fmessmer](https://avatars.githubusercontent.com/u/508006?s=80&u=34cff5e25c579c359ad4f4b566fbc425f1b353e5&v=4)
](/fmessmer)