    00815       std::string xmlString = this->[xmlPrefix_](classGazeboROSNode.html#a56a97753f6fc5e55f80bc9dd4365cf9f "prefix and suffix used for conversion from URDF to Gazebo XML") + xmlMiddle + this->[xmlSuffix_](classGazeboROSNode.html#a82f7515450366bb2ed7701429eaba99b);
    00816       {
    00817         boost::recursive_mutex::scoped_lock mrlock(*gazebo::Simulator::Instance()->GetMRMutex());
    00818         gazebo::World::Instance()->InsertEntity(xmlString);
    00819       }
    00820
    00821       // process spawning
    00822       //gazebo::World::Instance()->ProcessEntitiesToLoad();
    00823
    00825       [ros::Duration](../../../api/rostime/html/classros_1_1Duration.html) model_spawn_timeout(60.0);
    00826       [ros::Time](../../../api/rostime/html/classros_1_1Time.html) timeout = [ros::Time::now](../../../api/rostime/html/classros_1_1Time.html#a4652034e29ceebf378d5930ff5914c0c)() + model_spawn_timeout;
    00827       while (true)
    00828       {
    00829         if ([ros::Time::now](../../../api/rostime/html/classros_1_1Time.html#a4652034e29ceebf378d5930ff5914c0c)() > timeout)
    00830         {
    00831           res.[success](../../gazebo_msgs/html/structgazebo__msgs_1_1SpawnModelResponse__.html#a5ec6d9587b9a10ddc10ec198d41ccd62) = false;
    00832           res.[status_message](../../gazebo_msgs/html/structgazebo__msgs_1_1SpawnModelResponse__.html#acb4913011a74e88bdac7e11d173d8a7b) = std::string("SpawnModel: Model pushed to spawn queue, but spawn service timed out waiting for model to appear in simulation");
    00833           return false;
    00834         }
    00835         {
    00836           boost::recursive_mutex::scoped_lock lock(*gazebo::Simulator::Instance()->GetMRMutex());
    00837           if (gazebo::World::Instance()->GetEntityByName(model_name)) break;
    00838         }
    00839         [ROS_DEBUG](../../../api/rosconsole/html/macros__generated_8h.html#a83228c0b42c80605abdd0f42af64b1f7)("Waiting for spawning model (%s)",model_name.c_str());
    00840         usleep(1000);
    00841       }
    00842
    00843       // set result
    00844       res.[success](../../gazebo_msgs/html/structgazebo__msgs_1_1SpawnModelResponse__.html#a5ec6d9587b9a10ddc10ec198d41ccd62) = true;
    00845       res.[status_message](../../gazebo_msgs/html/structgazebo__msgs_1_1SpawnModelResponse__.html#acb4913011a74e88bdac7e11d173d8a7b) = std::string("SpawnModel: successfully spawned model");
    00846       return true;
    00847
    00848     }
    00849
    [00852](classGazeboROSNode.html#aa2df2752fb37a98ee82d41ea2aa2bb11)     bool [deleteModel](classGazeboROSNode.html#aa2df2752fb37a98ee82d41ea2aa2bb11 "delete model given name")([gazebo_msgs::DeleteModel::Request](../../gazebo_msgs/html/structgazebo__msgs_1_1DeleteModelRequest__.html) &req,[gazebo_msgs::DeleteModel::Response](../../gazebo_msgs/html/structgazebo__msgs_1_1DeleteModelResponse__.html) &res)
    00853     {
    00854       // clear forces, etc for the body in question
    00855
    00856       gazebo::Model* model = dynamic_cast<gazebo::Model*>(gazebo::World::Instance()->GetEntityByName(req.[model_name](../../gazebo_msgs/html/structgazebo__msgs_1_1DeleteModelRequest__.html#ae6bbe17db56816c9331ef6bf466e5f21)));
    00857       if (!model)


Copy link


> Start Gazebo in a paused state (default false)


Side note, I had to modify your urdf to replace ` note: ` \--> ` note ` and
replace tabs by spaces, otherwise, I get these types of errors (line/column
might be off from urdf in repo):


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.") ` …


[…ulation#93](https://github.com/ros-simulation/gazebo_ros_pkgs/issues/93)), sleeping for 1 second to avoid race condition. this branch should only be used for debugging, merge only as a last resort.


#  [ How to access contact Information form via the EntityComponentManager?
](//gazebo214.rssing.com/chan-57893035/latest-article2-live.php)


April 8, 2024, 1:08 pm


![Pumas 2022/2023 Font \(TTF &
OTF\)](//footballfonts.com/u/img/pumas-22-23-otf-font-installation.jpg)


Note: at this writing there are still a lot of errors and warnings from the
console output that need to be fixed from the PR2's URDF due to Gazebo API
changes.


March 28, 2023, 1:31 am


#  [ Can I apply zero gravity on .urdf models?
](//gazebo214.rssing.com/chan-57893035/latest-article8-live.php)


    00732
    00733       // store resulting Gazebo Model XML to be sent to spawn queue
    00734       // get incoming string containg either an URDF or a Gazebo Model XML
    00735       // grab from parameter server if necessary
    00736       // convert to Gazebo Model XML if necessary
    00737       if (!this->[IsGazeboModelXML](classGazeboROSNode.html#a681015bd9c7255d627902263a5b1b17b)(model_xml))
    00738       {
    00739         [ROS_ERROR](../../../api/rosconsole/html/macros__generated_8h.html#a7fb635b03cc608284eadecd2f8becd9a)("GazeboROSNode SpawnModel Failure: input model_xml not Gazebo XML, or cannot be converted to Gazebo XML");
    00740         res.[success](../../gazebo_msgs/html/structgazebo__msgs_1_1SpawnModelResponse__.html#a5ec6d9587b9a10ddc10ec198d41ccd62) = false;
    00741         res.[status_message](../../gazebo_msgs/html/structgazebo__msgs_1_1SpawnModelResponse__.html#acb4913011a74e88bdac7e11d173d8a7b) = std::string("GazeboROSNode SpawnModel Failure: input model_xml not Gazebo XML, or cannot be converted to Gazebo XML");
    00742         return false;
    00743       }
    00744
    00745       TiXmlDocument gazebo_model_xml;
    00746
    00747       // incoming robot model string is a string containing a Gazebo Model XML
    00751       std::string open_bracket("<?");
    00752       std::string close_bracket("?>");
    00753       size_t pos1 = model_xml.find(open_bracket,0);
    00754       size_t pos2 = model_xml.find(close_bracket,0);
    00755       if (pos1 != std::string::npos && pos2 != std::string::npos)
    00756         model_xml.replace(pos1,pos2-pos1+2,std::string(""));
    00757
    00758       // put string in TiXmlDocument for manipulation
    00759       gazebo_model_xml.Parse(model_xml.c_str());
    00760
    00761       // optional model manipulations:
    00762       //  * update initial pose
    00763       //  * replace model name
    00764       TiXmlElement* model;
    00765       model = gazebo_model_xml.FirstChildElement("model:physical");
    00766       if (model)
    00767       {
    00768         // replace initial pose of robot
    00769         // find first instance of xyz and rpy, replace with initial pose
    00770         TiXmlElement* xyz_key = model->FirstChildElement("xyz");
    00771         if (xyz_key)
    00772           model->RemoveChild(xyz_key);
    00773         TiXmlElement* rpy_key = model->FirstChildElement("rpy");
    00774         if (rpy_key)


All reactions


My workaround was to wait until Gazebo had finished loading and then run `
rosservice call /gazebo/set_model_configuration ` to set my desired initial
joint angles.

---

All reactions


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


ah, you mean resetting the simulation completely or kind of re-spawning?

---

All reactions


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


Hi! I see that gazebo garden is using the Brown Conrady radian distortion
model. For my research however, I would need to use the FOV distortio model
from "Devernay, F., Faugeras, O. Straight lines have to be straight. Machine
Vision and Applications 13, 14–24 (2001). https://doi.org/10.1007/PL00013269"
however. How would I go about doing that? The implementation location seems
fairly straightforward in [gazebo-
classic](https://github.com/gazebosim/gazebo-
classic/blob/e2436b3a2b32713e2b069f23689b62786273d773/gazebo/rendering/Distortion.cc#L385)
but I can't find it in gazebo garden's
[ImageBrownDistortionModel.cc](https://github.com/gazebosim/gz-
sensors/blob/gz-sensors7/src/ImageBrownDistortionModel.cc) and
[BrownDistortionModel.cc](https://github.com/gazebosim/gz-sensors/blob/gz-
sensors7/src/BrownDistortionModel.cc). Help on how to implement this would be
much appreciated!


    01912         gazebo::Vector3 target_pos(link_state->pose.position.x,link_state->pose.position.y,link_state->pose.position.z);
    01913         gazebo::Quatern target_rot(link_state->pose.orientation.w,link_state->pose.orientation.x,link_state->pose.orientation.y,link_state->pose.orientation.z);
    01914         gazebo::Pose3d target_pose(target_pos,target_rot);
    01915         gazebo::Vector3 target_linear_vel(link_state->twist.linear.x,link_state->twist.linear.y,link_state->twist.linear.z);
    01916         gazebo::Vector3 target_angular_vel(link_state->twist.angular.x,link_state->twist.angular.y,link_state->twist.angular.z);
    01917
    01918         if (frame)
    01919         {
    01920           gazebo::Pose3d  frame_pose = frame->GetWorldPose(); // - this->myBody->GetCoMPose();
    01921           gazebo::Vector3 frame_pos = frame_pose.pos;
    01922           gazebo::Quatern frame_rot = frame_pose.rot;
    01923
    01924           //std::cout << " debug : " << frame->GetName() << " : " << frame_pose << " : " << target_pose << std::endl;
    01925           //target_pose = frame_pose + target_pose; // seems buggy, use my own
    01926           target_pose.pos = frame_pos + frame_rot.RotateVector(target_pos);
    01927           target_pose.rot = frame_rot * target_pose.rot;
    01928
    01929           gazebo::Vector3 frame_linear_vel = frame->GetWorldLinearVel();
    01930           gazebo::Vector3 frame_angular_vel = frame->GetWorldAngularVel();
    01931           target_linear_vel -= frame_linear_vel;
    01932           target_angular_vel -= frame_angular_vel;
    01933         }
    01934         else if (link_state->reference_frame == "" || link_state->reference_frame == "world" || link_state->reference_frame == "map" || link_state->reference_frame == "/map")
    01935         {
    01936           [ROS_DEBUG](../../../api/rosconsole/html/macros__generated_8h.html#a83228c0b42c80605abdd0f42af64b1f7)("SetLinkState: reference_frame is empty/world/map, using inertial frame");
    01937         }
    01938         else
    01939         {
    01940           [ROS_ERROR](../../../api/rosconsole/html/macros__generated_8h.html#a7fb635b03cc608284eadecd2f8becd9a)("SetLinkState: reference_frame is not a valid link name");
    01941           return;
    01942         }
    01943
    01944         //std::cout << " debug : " << target_pose << std::endl;
    01945         //boost::recursive_mutex::scoped_lock lock(*Simulator::Instance()->GetMRMutex());
    01946
    01947         bool is_paused = gazebo::Simulator::Instance()->IsPaused();
    01948         gazebo::Simulator::Instance()->SetPaused(true);
    01949         body->SetWorldPose(target_pose);
    01950         gazebo::Simulator::Instance()->SetPaused(is_paused);
    01951


There are two ways to launch your URDF-based robot into Gazebo using `
roslaunch ` :


###  [ Top 20 Hot and Sexy Dragon Ball Z Girls (Characters)
](////lists288.rssing.com/chan-11077187/article374.html#c11077187a374i164684108)


Copy link


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


##  Top-Rated Images


then I updated Gazebo. For some reason only then 7.15 was installed.


Not sure why yet. Calling set configuration through rosservice seems to work
after the model has been spawned:


[ 0  ](javascript:; "Show Rating")


Assignees


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


#  [ Gazebo garden : Plugin for FOV distortion model
](//gazebo214.rssing.com/chan-57893035/latest-article22-live.php)


[ ![Fake lip ring, silver lip ring, simple lip ring, unisex lip ring by
AIRlab](//i.etsystatic.com/10798216/r/il/3a91cc/761285074/il_570xN.761285074_fu8j.jpg)
](////kuteriot1.rssing.com/chan-5865851/article17035.html#c5865851a17035i913072506)


env | grep GAZEBO_RESOURCE_PATH


###  [ Highlights - Bringing young people to the forefront of EU policy making
-...
](////europees185.rssing.com/chan-78228109/article559.html#c78228109a559i1335926349)


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


[ Search ](javascript:;)


July 31, 2023, 7:27 am


Is the above currently the best solution for this issue or can anybody point
me to a more reliable fix/solution?
Gazebo 9/Melodic

---

All reactions


[ _≪_ Previous: Gazebo Fortress Custom plugins causing scene to not load
](//gazebo214.rssing.com/chan-57893035/latest.php#c57893035a6935 "Previous
Article")


[ ![Have you seen Michael Wines? Burien man has been missing since
Saturday,...](//b-townblog.com/wp-
content/uploads/2024/04/michael-3shoe.jpg?_t=1712879471)
](////normandy480.rssing.com/chan-74604448/article56.html#c74604448a56i1857302427)


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


###  Launching Other Demo Worlds


###  Footer navigation


[ ](javascript:; "Like") 0


edited


© 2024 //www.rssing.com


July 27, 2023, 11:01 pm


![Murder in Australia:
2010](//2.bp.blogspot.com/-zEjZIawSSso/UMBtH81fykI/AAAAAAAAAMU/PNsllPLf124/s640/hunterian.jpg)


    00366         this->[wrench_body_jobs](classGazeboROSNode.html#ade2831b1970d2ceed871e82a9140c2bb).erase(iter);
    00367       }
    00368       this->[lock_](classGazeboROSNode.html#a3895043c9355e3e2a23f84efe0060736 "A mutex to lock access to fields that are used in ROS message callbacks.").unlock();
    00369     }
    00370
    [00372](classGazeboROSNode.html#ab7cc0342705dfac7b7aac77001ad3603)     void [gazeboQueueThread](classGazeboROSNode.html#ab7cc0342705dfac7b7aac77001ad3603 "ros queue thread for this node")()
    00373     {
    00374       [ROS_DEBUG_STREAM](../../../api/rosconsole/html/macros__generated_8h.html#abe3fd4f1f711e3046f7c3a8e3f5757b0)("Callback thread id=" << boost::this_thread::get_id());
    00375       static const double timeout = 0.001;
    00376       static const double status_timeout = 1.0;
    00377
    00378       [ros::WallTime](../../../api/rostime/html/classros_1_1WallTime.html) last_status_time;
    00379       std_msgs::Bool stat;
    00380       while (this->[rosnode_](classGazeboROSNode.html#ae9011736edb2ec542d7176cdddeb546d).[ok](../../../api/roscpp/html/classros_1_1NodeHandle.html#ab4ee3d7b4d7fe52696fcfb84cc388331)())
    00381       {
    00382         this->[gazebo_queue_](classGazeboROSNode.html#aaad18c9d54a8736ea6337821de03889a).[callAvailable](../../../api/roscpp/html/classros_1_1CallbackQueue.html#a82c2abb2c11a7bf90e7ee46625e24eeb)([ros::WallDuration](../../../api/rostime/html/classros_1_1WallDuration.html)(timeout));
    00383
    00384         if (([ros::WallTime::now](../../../api/rostime/html/classros_1_1WallTime.html#a416639362578694d47f989e4fb7f1ae0)() - last_status_time).toSec() > status_timeout)
    00385         {
    00386                 stat.data = gazebo::Simulator::Instance()->IsPaused();
    00387                 [pub_gazebo_paused_](classGazeboROSNode.html#a5d3fe16d1240033b9bb04ef67bc24c9a).[publish](../../../api/roscpp/html/classros_1_1Publisher.html#af4e0009d55b5a7729fd71c3ffdf502cd)(stat);
    00388                 last_status_time = [ros::WallTime::now](../../../api/rostime/html/classros_1_1WallTime.html#a416639362578694d47f989e4fb7f1ae0)();
    00389         }
    00390       }
    00391     }
    00392
    [00394](classGazeboROSNode.html#a373bfa381a9d1631537af92ecfa11499)     void [AdvertiseServices](classGazeboROSNode.html#a373bfa381a9d1631537af92ecfa11499 "advertise services")()
    00395     {
    00396       // Advertise spawn services on the custom queue
    00397       std::string spawn_urdf_model_service_name("spawn_urdf_model");
    00398       [ros::AdvertiseServiceOptions](../../../api/roscpp/html/structros_1_1AdvertiseServiceOptions.html) spawn_urdf_model_aso = ros::AdvertiseServiceOptions::create<gazebo_msgs::SpawnModel>(
    00399           spawn_urdf_model_service_name,boost::bind(&[GazeboROSNode::spawnURDFModel](classGazeboROSNode.html#ae64f3ffa32532763364a4b1c0fa0578e),this,_1,_2),
    00400           ros::VoidPtr(), &this->[gazebo_queue_](classGazeboROSNode.html#aaad18c9d54a8736ea6337821de03889a));
    00401       [spawn_urdf_model_service_](classGazeboROSNode.html#a6ac26108e1ff9418cffdee5dbf0d2fe3) = this->[rosnode_](classGazeboROSNode.html#ae9011736edb2ec542d7176cdddeb546d).[advertiseService](../../../api/roscpp/html/classros_1_1NodeHandle.html#ae659319707eb40e8ef302763f7d632da)(spawn_urdf_model_aso);
    00402
    00403       // Advertise spawn services on the custom queue
    00404       std::string spawn_gazebo_model_service_name("spawn_gazebo_model");
    00405       [ros::AdvertiseServiceOptions](../../../api/roscpp/html/structros_1_1AdvertiseServiceOptions.html) spawn_gazebo_model_aso = ros::AdvertiseServiceOptions::create<gazebo_msgs::SpawnModel>(
    00406           spawn_gazebo_model_service_name,boost::bind(&[GazeboROSNode::spawnGazeboModel](classGazeboROSNode.html#a7eb487a51a9a6ecb286f63f537d541f6),this,_1,_2),
    00407           ros::VoidPtr(), &this->[gazebo_queue_](classGazeboROSNode.html#aaad18c9d54a8736ea6337821de03889a));


[ _≫_ Next: Spawning multiple models causes error
](//gazebo214.rssing.com/chan-57893035/latest.php#c57893035a6955 "Next
Article")


###  [ Noise Industries FxFactory Pro 3.0.2 [MAC]
](////heroturko111.rssing.com/chan-16832457/article82.html#c16832457a82i1004730930)


#  [ URI paths to packages in the SDF model file?
](//gazebo214.rssing.com/chan-57893035/latest-article3-live.php)


New issue


[ ![@kev-the-
dev](https://avatars.githubusercontent.com/u/9502636?s=80&u=a246e1b2783530c3db75fe8de6c08b94ce4ab3fa&v=4)
](/kev-the-dev)


Ubuntu 22.04 Gazebo: Ignition Fortress gazebo plugin: 1 Context, I've been
trying to get a force sensor plugin working in gazebo fortress, however all
the ones I've found are either for gazebo classic, or just fail to run with
little documentation (an issue that plagues a lot of modern gazebo imo). my
next solution was to create a custom plugin that solved my needs. Currently
I've created the example system plugin following the Gazebo API guides [on
creating system
plugins](https://gazebosim.org/api/gazebo/6/createsystemplugins.html). and
after spending some time figuring out that you need to set the [gazebo plugin
path](https://gazebosim.org/api/gazebo/6/resources.html) I've got a plugin
that builds in cmake correctly and is loaded by gazebo. however once it loads
it prevents the scene from being created, leaving me with a blank window. Here
are the relevant files ## World file (including plugin)  0.001  1  1000
https://fuel.ignitionrobotics.org/1.0/OpenRobotics/models/Ground Plane  0 0 0
6e-06 2.3e-05 -4.2e-05  0.4 0.4 0.4 1  0.7 0.7 0.7 1  true  0 0 10 0 -0 0
true  1  -0.5 0.1 -0.9  0.8 0.8 0.8 1  0.2 0.2 0.2 1  1000  0.01
0.90000000000000002  0.001  0  0  0  ## gazebo_plugin.hpp: #ifndef
_GAZEBO_SAMPLE_SYSTEM_PLUGIN_ #define _GAZEBO_SAMPLE_SYSTEM_PLUGIN_ #include
#include  namespace sample_system { class SampleSystem: public
ignition::gazebo::System, public ignition::gazebo::ISystemPostUpdate, //
public ignition::gazebo::ISystemPreUpdate, // public
ignition::gazebo::ISystemUpdate, public ignition::gazebo::ISystemConfigure {
public: SampleSystem(); ~SampleSystem() override; void PostUpdate(const
ignition::gazebo::UpdateInfo &_info, const
ignition::gazebo::EntityComponentManager &_ecm) override; // void
PreUpdate(const ignition::gazebo::UpdateInfo &_info,
ignition::gazebo::EntityComponentManager &_ecm) override; // void Update(const
ignition::gazebo::UpdateInfo &_info, ignition::gazebo::EntityComponentManager
&_ecm) override; void Configure(const ignition::gazebo::Entity &_entity, const
std::shared_ptr  & _sdf, ignition::gazebo::EntityComponentManager &_ecm,
ignition::gazebo::EventManager &/*_eventMgr*/); private:
ignition::gazebo::Entity linkEntity; }; } IGNITION_ADD_PLUGIN(
sample_system::SampleSystem, ignition::gazebo::System, //
sample_system::SampleSystem::ISystemPreUpdate, //
sample_system::SampleSystem::ISystemUpdate,
sample_system::SampleSystem::ISystemPostUpdate )
IGNITION_ADD_PLUGIN_ALIAS(sample_system::SampleSystem,"ignition::gazebo::systems::SampleSystem")
#endif ## Gazebo_Plugin.cpp: #include "gazebo_system_plugin.hpp" #include
#include  using namespace sample_system; using namespace ignition::gazebo::v6;
SampleSystem::SampleSystem(){ } SampleSystem::~SampleSystem(){ } void


Toggle navigation


[ ↂ
](////myhome191.rssing.com/chan-15086300/article8401.html#c15086300a8401i282862088
"5 Dromlee Crescent, Beaumont, Dublin 9 - €399,950")


* ❤  1 reaction


* Within the same package, create a ` worlds ` folder, and create a MYROBOT.world file with the following contents:


A bit of a limp comment, but I can second [ @Nurgak
](https://github.com/Nurgak) 's experience. I just had to change my gazebo
node to start up paused in order to have the -J argument work, otherwise it
would fail as described.

---

All reactions


Collaborator


  * [ Code  ](/ros-simulation/gazebo_ros_pkgs)
  * [ Issues  271  ](/ros-simulation/gazebo_ros_pkgs/issues)
  * [ Pull requests  94  ](/ros-simulation/gazebo_ros_pkgs/pulls)
  * [ Actions  ](/ros-simulation/gazebo_ros_pkgs/actions)
  * [ Projects  0  ](/ros-simulation/gazebo_ros_pkgs/projects)
  * [ Wiki  ](/ros-simulation/gazebo_ros_pkgs/wiki)
  * [ Security  ](/ros-simulation/gazebo_ros_pkgs/security)
  * [ Insights  ](/ros-simulation/gazebo_ros_pkgs/pulse)


Good morning, everyone, I am trying to get some information between two links
in contact. These two links need to be able to interpenetrate into each other,
so to do this I set the `  ` to get a bitwise `AND` equal to `0x00` and
physically see the bodies inside each other. Good. Now I'd like to get the
names of the entities in contact, and I've tried using a `contact_sensor`, but
not getting any info. How can I get information about the contact between two
entities, and thus trace the `name` and `model_entity`, while still being able
to physically see the two bodies interpenetrate each other? Thanks!


[ Create an atom example of a hand-eye system  lardemua/atom#686
](/lardemua/atom/issues/686)


  * 👍  1 reaction
  * ❤  3 reactions


    02080       wej->[start_time](classGazeboROSNode_1_1WrenchBodyJob.html#a801ad39110b8f202470bd1562a62bd02) = req.[start_time](../../gazebo_msgs/html/structgazebo__msgs_1_1ApplyBodyWrenchRequest__.html#a0244cf9f90e8a684e3a0fcfed48bd642);
    02081       if (wej->[start_time](classGazeboROSNode_1_1WrenchBodyJob.html#a801ad39110b8f202470bd1562a62bd02) < [ros::Time](../../../api/rostime/html/classros_1_1Time.html)(gazebo::Simulator::Instance()->GetSimTime().Double()))
    02082         wej->[start_time](classGazeboROSNode_1_1WrenchBodyJob.html#a801ad39110b8f202470bd1562a62bd02) = [ros::Time](../../../api/rostime/html/classros_1_1Time.html)(gazebo::Simulator::Instance()->GetSimTime().Double());
    02083       wej->[duration](classGazeboROSNode_1_1WrenchBodyJob.html#a4e8f3e2d041e97817a80a6feb9bd25a6) = req.[duration](../../gazebo_msgs/html/structgazebo__msgs_1_1ApplyBodyWrenchRequest__.html#a67cf0e22cc0c9d1782cee00b84ff5986);
    02084       this->[lock_](classGazeboROSNode.html#a3895043c9355e3e2a23f84efe0060736 "A mutex to lock access to fields that are used in ROS message callbacks.").lock();
    02085       this->[wrench_body_jobs](classGazeboROSNode.html#ade2831b1970d2ceed871e82a9140c2bb).push_back(wej);
    02086       this->[lock_](classGazeboROSNode.html#a3895043c9355e3e2a23f84efe0060736 "A mutex to lock access to fields that are used in ROS message callbacks.").unlock();
    02087
    02088       res.[success](../../gazebo_msgs/html/structgazebo__msgs_1_1ApplyBodyWrenchResponse__.html#a614b4dd49b7b7f87fb360bc0f420f8ed) = true;
    02089       res.[status_message](../../gazebo_msgs/html/structgazebo__msgs_1_1ApplyBodyWrenchResponse__.html#aeb381da235043f2b7e2875d78beacade) = "";
    02090       return true;
    02091     }
    02092
    02093
    02094   private:
    [02095](classGazeboROSNode.html#ae9011736edb2ec542d7176cdddeb546d)     [ros::NodeHandle](../../../api/roscpp/html/classros_1_1NodeHandle.html) [rosnode_](classGazeboROSNode.html#ae9011736edb2ec542d7176cdddeb546d);
    [02096](classGazeboROSNode.html#aaad18c9d54a8736ea6337821de03889a)     [ros::CallbackQueue](../../../api/roscpp/html/classros_1_1CallbackQueue.html) [gazebo_queue_](classGazeboROSNode.html#aaad18c9d54a8736ea6337821de03889a);
    [02097](classGazeboROSNode.html#a382ac60d7e343d5dc666c4cf3d399bf7)     boost::thread* [gazebo_callback_queue_thread_](classGazeboROSNode.html#a382ac60d7e343d5dc666c4cf3d399bf7);
    02098
    [02099](classGazeboROSNode.html#a6ac26108e1ff9418cffdee5dbf0d2fe3)     [ros::ServiceServer](../../../api/roscpp/html/classros_1_1ServiceServer.html) [spawn_urdf_model_service_](classGazeboROSNode.html#a6ac26108e1ff9418cffdee5dbf0d2fe3);
    [02100](classGazeboROSNode.html#a7a24535e62917150745455c038963b78)     [ros::ServiceServer](../../../api/roscpp/html/classros_1_1ServiceServer.html) [spawn_urdf_gazebo_service_](classGazeboROSNode.html#a7a24535e62917150745455c038963b78);
    [02101](classGazeboROSNode.html#ae77996b35f6b28516ecc168075da1288)     [ros::ServiceServer](../../../api/roscpp/html/classros_1_1ServiceServer.html) [delete_model_service_](classGazeboROSNode.html#ae77996b35f6b28516ecc168075da1288);
    [02102](classGazeboROSNode.html#ade3fc7aa049f6434c87dc8f5cdb2b8eb)     [ros::ServiceServer](../../../api/roscpp/html/classros_1_1ServiceServer.html) [get_model_state_service_](classGazeboROSNode.html#ade3fc7aa049f6434c87dc8f5cdb2b8eb);
    [02103](classGazeboROSNode.html#a14c4ecaaf7e13e5f367f44b01e567d99)     [ros::ServiceServer](../../../api/roscpp/html/classros_1_1ServiceServer.html) [get_model_properties_service_](classGazeboROSNode.html#a14c4ecaaf7e13e5f367f44b01e567d99);
    [02104](classGazeboROSNode.html#afd150de77e8d4e6fa4707e22586cb429)     [ros::ServiceServer](../../../api/roscpp/html/classros_1_1ServiceServer.html) [get_world_properties_service_](classGazeboROSNode.html#afd150de77e8d4e6fa4707e22586cb429);
    [02105](classGazeboROSNode.html#a290bee43c2217b9d1a38702770fae0c8)     [ros::ServiceServer](../../../api/roscpp/html/classros_1_1ServiceServer.html) [get_joint_properties_service_](classGazeboROSNode.html#a290bee43c2217b9d1a38702770fae0c8);
    [02106](classGazeboROSNode.html#a813f1a04d708c60c34e9f8b864a771ed)     [ros::ServiceServer](../../../api/roscpp/html/classros_1_1ServiceServer.html) [get_link_properties_service_](classGazeboROSNode.html#a813f1a04d708c60c34e9f8b864a771ed);
    [02107](classGazeboROSNode.html#aecd05ef53d8ef891a0c675d1a5f28c09)     [ros::ServiceServer](../../../api/roscpp/html/classros_1_1ServiceServer.html) [get_link_state_service_](classGazeboROSNode.html#aecd05ef53d8ef891a0c675d1a5f28c09);
    [02108](classGazeboROSNode.html#a901e93c427ccb3007269685d709a5d5e)     [ros::ServiceServer](../../../api/roscpp/html/classros_1_1ServiceServer.html) [set_link_properties_service_](classGazeboROSNode.html#a901e93c427ccb3007269685d709a5d5e);
    [02109](classGazeboROSNode.html#af0b30926f98009ffd14147ad22b137ee)     [ros::ServiceServer](../../../api/roscpp/html/classros_1_1ServiceServer.html) [set_physics_properties_service_](classGazeboROSNode.html#af0b30926f98009ffd14147ad22b137ee);
    [02110](classGazeboROSNode.html#a6bb1fa9e176137ed05eed396e54f6c58)     [ros::ServiceServer](../../../api/roscpp/html/classros_1_1ServiceServer.html) [get_physics_properties_service_](classGazeboROSNode.html#a6bb1fa9e176137ed05eed396e54f6c58);
    [02111](classGazeboROSNode.html#a00bff62a4053d3ce149659ec76ed33c0)     [ros::ServiceServer](../../../api/roscpp/html/classros_1_1ServiceServer.html) [apply_body_wrench_service_](classGazeboROSNode.html#a00bff62a4053d3ce149659ec76ed33c0);
    [02112](classGazeboROSNode.html#a2a2dc8937cd326cc608f25e84cd1ec52)     [ros::ServiceServer](../../../api/roscpp/html/classros_1_1ServiceServer.html) [set_joint_properties_service_](classGazeboROSNode.html#a2a2dc8937cd326cc608f25e84cd1ec52);
    [02113](classGazeboROSNode.html#acd495ec25d2d35e51c5e308ab278d466)     [ros::ServiceServer](../../../api/roscpp/html/classros_1_1ServiceServer.html) [set_model_state_service_](classGazeboROSNode.html#acd495ec25d2d35e51c5e308ab278d466);
    [02114](classGazeboROSNode.html#ab51b0de7d13b27dbd1e1f9b473bcd66d)     [ros::ServiceServer](../../../api/roscpp/html/classros_1_1ServiceServer.html) [apply_joint_effort_service_](classGazeboROSNode.html#ab51b0de7d13b27dbd1e1f9b473bcd66d);
    [02115](classGazeboROSNode.html#a90d90e15fd2318bd6d8f4e735348289d)     [ros::ServiceServer](../../../api/roscpp/html/classros_1_1ServiceServer.html) [set_model_configuration_service_](classGazeboROSNode.html#a90d90e15fd2318bd6d8f4e735348289d);
    [02116](classGazeboROSNode.html#aaba51f3b2d3046753a2458ec5c85ba41)     [ros::ServiceServer](../../../api/roscpp/html/classros_1_1ServiceServer.html) [set_link_state_service_](classGazeboROSNode.html#aaba51f3b2d3046753a2458ec5c85ba41);
    [02117](classGazeboROSNode.html#a231ed04b51db92a2961ef73fb576797c)     [ros::ServiceServer](../../../api/roscpp/html/classros_1_1ServiceServer.html) [reset_simulation_service_](classGazeboROSNode.html#a231ed04b51db92a2961ef73fb576797c);
    [02118](classGazeboROSNode.html#a3ff4a2cb807ac60b5a331f084120f74d)     [ros::ServiceServer](../../../api/roscpp/html/classros_1_1ServiceServer.html) [reset_world_service_](classGazeboROSNode.html#a3ff4a2cb807ac60b5a331f084120f74d);
    [02119](classGazeboROSNode.html#a02800aa046c0cb9bd436bd1407d00e5f)     [ros::ServiceServer](../../../api/roscpp/html/classros_1_1ServiceServer.html) [pause_physics_service_](classGazeboROSNode.html#a02800aa046c0cb9bd436bd1407d00e5f);


    [02242](classGazeboROSNode.html#a3895043c9355e3e2a23f84efe0060736)     boost::mutex [lock_](classGazeboROSNode.html#a3895043c9355e3e2a23f84efe0060736 "A mutex to lock access to fields that are used in ROS message callbacks.");
    02243
    [02245](classGazeboROSNode.html#a56a97753f6fc5e55f80bc9dd4365cf9f)     std::string [xmlPrefix_](classGazeboROSNode.html#a56a97753f6fc5e55f80bc9dd4365cf9f "prefix and suffix used for conversion from URDF to Gazebo XML");
    [02246](classGazeboROSNode.html#a82f7515450366bb2ed7701429eaba99b)     std::string [xmlSuffix_](classGazeboROSNode.html#a82f7515450366bb2ed7701429eaba99b);
    02247
    [02249](classGazeboROSNode.html#af3cdc74804e479ef28bd36824eee13fc)     void [SetupTransform](classGazeboROSNode.html#af3cdc74804e479ef28bd36824eee13fc "utility for transforming in SetModelConfiguration")(btTransform &transform, [urdf::Pose](../../../api/urdf_interface/html/classurdf_1_1Pose.html) pose)
    02250     {
    02251         btMatrix3x3 mat;
    02252         mat.setRotation(btQuaternion(pose.[rotation](../../../api/urdf_interface/html/classurdf_1_1Pose.html#add014150a280a0b4af28acb89e6dd9ab).x,pose.[rotation](../../../api/urdf_interface/html/classurdf_1_1Pose.html#add014150a280a0b4af28acb89e6dd9ab).y,pose.[rotation](../../../api/urdf_interface/html/classurdf_1_1Pose.html#add014150a280a0b4af28acb89e6dd9ab).z,pose.[rotation](../../../api/urdf_interface/html/classurdf_1_1Pose.html#add014150a280a0b4af28acb89e6dd9ab).w));
    02253         transform = btTransform(mat,btVector3(pose.[position](../../../api/urdf_interface/html/classurdf_1_1Pose.html#adbee6f421be42f2a33e75e9d25085669).[x](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Vector3__.html#abf9dabaf651196aee50fd14bf3b643be),pose.[position](../../../api/urdf_interface/html/classurdf_1_1Pose.html#adbee6f421be42f2a33e75e9d25085669).[y](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Vector3__.html#aaea58ad929c43960a06f728d97132404),pose.[position](../../../api/urdf_interface/html/classurdf_1_1Pose.html#adbee6f421be42f2a33e75e9d25085669).[z](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Vector3__.html#a4cde719326e6c3688ab50b51ab4708b1)));
    02254     }
    [02255](classGazeboROSNode.html#a5decfaa0265816cc009e97c89daa6235)     void [SetupTransform](classGazeboROSNode.html#af3cdc74804e479ef28bd36824eee13fc "utility for transforming in SetModelConfiguration")(btTransform &transform, [geometry_msgs::Pose](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Pose__.html) pose)
    02256     {
    02257         btMatrix3x3 mat;
    02258         mat.setRotation(btQuaternion(pose.[orientation](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Pose__.html#af8c1d34a44a7628ea9c3e571339f5a28).[x](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Quaternion__.html#a11f3b4e2df587ce516fd2a8140c1c7c5),pose.[orientation](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Pose__.html#af8c1d34a44a7628ea9c3e571339f5a28).[y](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Quaternion__.html#a601c978178311ce3a618afb38c0b6b98),pose.[orientation](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Pose__.html#af8c1d34a44a7628ea9c3e571339f5a28).[z](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Quaternion__.html#ae2caceb9fc4b2fd01acd8419aa7ebc2e),pose.[orientation](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Pose__.html#af8c1d34a44a7628ea9c3e571339f5a28).[w](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Quaternion__.html#a440791d268a65607ecbac21e0ed153cf)));
    02259         transform = btTransform(mat,btVector3(pose.[position](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Pose__.html#a27067d1772d85a856b0e4ed4690a80b4).[x](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Point__.html#acd9420e6916084b2a9c09019bfda1708),pose.[position](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Pose__.html#a27067d1772d85a856b0e4ed4690a80b4).[y](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Point__.html#a46a84ff5a3e5817ab5693abda66fccb0),pose.[position](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Pose__.html#a27067d1772d85a856b0e4ed4690a80b4).[z](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Point__.html#a061f0093e927a95998f35ceceb5cebda)));
    02260     }
    02261
    02262
    02263
    02264
    [02266](classGazeboROSNode.html#a44e27d338cc6fef752fcc039a6daa3ec)     bool [IsURDF](classGazeboROSNode.html#a44e27d338cc6fef752fcc039a6daa3ec "utilites for checking incoming string URDF/XML/Param")(std::string model_xml)
    02267     {
    02268       TiXmlDocument doc_in;
    02269       doc_in.Parse(model_xml.c_str());
    02270       if (doc_in.FirstChild("robot"))
    02271         return true;
    02272       else
    02273         return false;
    02274     }
    [02275](classGazeboROSNode.html#a476d9e8af3d9ad6b6a9385fe94455ced)     bool [IsColladaData](classGazeboROSNode.html#a476d9e8af3d9ad6b6a9385fe94455ced)(const std::string& data) // copied from urdf/src/model.cpp
    02276     {
    02277       return data.find("<COLLADA") != std::string::npos;
    02278     }
    [02279](classGazeboROSNode.html#a681015bd9c7255d627902263a5b1b17b)     bool [IsGazeboModelXML](classGazeboROSNode.html#a681015bd9c7255d627902263a5b1b17b)(std::string model_xml)
    02280     {
    02281       TiXmlDocument doc_in;
    02282       doc_in.Parse(model_xml.c_str());
    02283       if (doc_in.FirstChild("model:physical"))
    02284         return true;


#  Search code, repositories, users, issues, pull requests...


Additional navigation options


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


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


* 👍  1 reaction


April 12, 2024, 3:59 pm


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


July 29, 2023, 11:41 am


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


Merged


    [02120](classGazeboROSNode.html#a29a3c7cd81b53e4d44e9df9a9148336c)     [ros::ServiceServer](../../../api/roscpp/html/classros_1_1ServiceServer.html) [unpause_physics_service_](classGazeboROSNode.html#a29a3c7cd81b53e4d44e9df9a9148336c);
    [02121](classGazeboROSNode.html#ad766fc703dd022e87b4270aaf941da3b)     [ros::ServiceServer](../../../api/roscpp/html/classros_1_1ServiceServer.html) [clear_joint_forces_service_](classGazeboROSNode.html#ad766fc703dd022e87b4270aaf941da3b);
    [02122](classGazeboROSNode.html#a3606e1466660e6b43cecee7b3c246050)     [ros::ServiceServer](../../../api/roscpp/html/classros_1_1ServiceServer.html) [clear_body_wrenches_service_](classGazeboROSNode.html#a3606e1466660e6b43cecee7b3c246050);
    [02123](classGazeboROSNode.html#a498ffe7e5679a42ce7fbba55ebf7746f)     [ros::Subscriber](../../../api/roscpp/html/classros_1_1Subscriber.html)    [set_link_state_topic_](classGazeboROSNode.html#a498ffe7e5679a42ce7fbba55ebf7746f);
    [02124](classGazeboROSNode.html#a4acfb9bd33579d8fe776a7c516baaec9)     [ros::Subscriber](../../../api/roscpp/html/classros_1_1Subscriber.html)    [set_model_state_topic_](classGazeboROSNode.html#a4acfb9bd33579d8fe776a7c516baaec9);
    [02125](classGazeboROSNode.html#aed02a543ac7934fc64049963e08fe30f)     [ros::Publisher](../../../api/roscpp/html/classros_1_1Publisher.html)     [pub_clock_](classGazeboROSNode.html#aed02a543ac7934fc64049963e08fe30f);
    [02126](classGazeboROSNode.html#ac591a7b9378b025c5acd7b53a59e87b5)     [ros::Publisher](../../../api/roscpp/html/classros_1_1Publisher.html)     [pub_link_states_](classGazeboROSNode.html#ac591a7b9378b025c5acd7b53a59e87b5);
    [02127](classGazeboROSNode.html#a9956d9b0ba56fa9ae7910588c22931e0)     [ros::Publisher](../../../api/roscpp/html/classros_1_1Publisher.html)     [pub_model_states_](classGazeboROSNode.html#a9956d9b0ba56fa9ae7910588c22931e0);
    [02128](classGazeboROSNode.html#a5d3fe16d1240033b9bb04ef67bc24c9a)     [ros::Publisher](../../../api/roscpp/html/classros_1_1Publisher.html)     [pub_gazebo_paused_](classGazeboROSNode.html#a5d3fe16d1240033b9bb04ef67bc24c9a);
    [02129](classGazeboROSNode.html#ac131709cfe171cca7a556620a9180d56)     int                [pub_link_states_connection_count_](classGazeboROSNode.html#ac131709cfe171cca7a556620a9180d56);
    [02130](classGazeboROSNode.html#a5c5117f163d5a790ffd92cb56073ca66)     int                [pub_model_states_connection_count_](classGazeboROSNode.html#a5c5117f163d5a790ffd92cb56073ca66);
    02131
    02132     // physics dynamic reconfigure
    [02133](classGazeboROSNode.html#abadd1aabaaa2353bccd4a48bc561e779)     boost::thread* [physics_reconfigure_thread_](classGazeboROSNode.html#abadd1aabaaa2353bccd4a48bc561e779);
    [02134](classGazeboROSNode.html#a2181c5f39b7ef9e85ef3382e53f66b40)     bool [physics_reconfigure_initialized_](classGazeboROSNode.html#a2181c5f39b7ef9e85ef3382e53f66b40);
    02135
    [02136](classGazeboROSNode.html#a401861e9aa2d4421f34dc92411e41afd)     [ros::ServiceClient](../../../api/roscpp/html/classros_1_1ServiceClient.html) [physics_reconfigure_set_client_](classGazeboROSNode.html#a401861e9aa2d4421f34dc92411e41afd);
    [02137](classGazeboROSNode.html#a7dd692c657f72627df72e9b765679a10)     [ros::ServiceClient](../../../api/roscpp/html/classros_1_1ServiceClient.html) [physics_reconfigure_get_client_](classGazeboROSNode.html#a7dd692c657f72627df72e9b765679a10);
    02138
    [02139](classGazeboROSNode.html#a03177cbae757eebae30cf03d7950d532)     void [PhysicsReconfigureCallback](classGazeboROSNode.html#a03177cbae757eebae30cf03d7950d532)(gazebo::PhysicsConfig &config, [uint32_t](../../../api/rxtools/html/namespacerxtools.html#a4df59b602fbf4c488b2e8eebe9a516ec) level)
    02140     {
    02141       if (![physics_reconfigure_initialized_](classGazeboROSNode.html#a2181c5f39b7ef9e85ef3382e53f66b40))
    02142       {
    02143         [gazebo_msgs::GetPhysicsProperties](../../gazebo_msgs/html/structgazebo__msgs_1_1GetPhysicsProperties.html) srv;
    02144         this->[physics_reconfigure_get_client_](classGazeboROSNode.html#a7dd692c657f72627df72e9b765679a10).[call](../../../api/roscpp/html/classros_1_1ServiceClient.html#ad7f2499f8fcdc6598e284bc6094d2d77)(srv);
    02145
    02146         config.time_step                   = srv.[response](../../gazebo_msgs/html/structgazebo__msgs_1_1GetPhysicsProperties.html#aef0d0e922e15a50ec7d09bfb39cf321a).time_step;
    02147         config.max_update_rate             = srv.[response](../../gazebo_msgs/html/structgazebo__msgs_1_1GetPhysicsProperties.html#aef0d0e922e15a50ec7d09bfb39cf321a).max_update_rate;
    02148         config.gravity_x                   = srv.[response](../../gazebo_msgs/html/structgazebo__msgs_1_1GetPhysicsProperties.html#aef0d0e922e15a50ec7d09bfb39cf321a).gravity.x;
    02149         config.gravity_y                   = srv.[response](../../gazebo_msgs/html/structgazebo__msgs_1_1GetPhysicsProperties.html#aef0d0e922e15a50ec7d09bfb39cf321a).gravity.y;
    02150         config.gravity_z                   = srv.[response](../../gazebo_msgs/html/structgazebo__msgs_1_1GetPhysicsProperties.html#aef0d0e922e15a50ec7d09bfb39cf321a).gravity.z;
    02151         config.auto_disable_bodies         = srv.[response](../../gazebo_msgs/html/structgazebo__msgs_1_1GetPhysicsProperties.html#aef0d0e922e15a50ec7d09bfb39cf321a).ode_config.auto_disable_bodies;
    02152         config.sor_pgs_precon_iters        = srv.[response](../../gazebo_msgs/html/structgazebo__msgs_1_1GetPhysicsProperties.html#aef0d0e922e15a50ec7d09bfb39cf321a).ode_config.sor_pgs_precon_iters;
    02153         config.sor_pgs_iters               = srv.[response](../../gazebo_msgs/html/structgazebo__msgs_1_1GetPhysicsProperties.html#aef0d0e922e15a50ec7d09bfb39cf321a).ode_config.sor_pgs_iters;
    02154         config.sor_pgs_rms_error_tol       = srv.[response](../../gazebo_msgs/html/structgazebo__msgs_1_1GetPhysicsProperties.html#aef0d0e922e15a50ec7d09bfb39cf321a).ode_config.sor_pgs_rms_error_tol;
    02155         config.sor_pgs_w                   = srv.[response](../../gazebo_msgs/html/structgazebo__msgs_1_1GetPhysicsProperties.html#aef0d0e922e15a50ec7d09bfb39cf321a).ode_config.sor_pgs_w;
    02156         config.contact_surface_layer       = srv.[response](../../gazebo_msgs/html/structgazebo__msgs_1_1GetPhysicsProperties.html#aef0d0e922e15a50ec7d09bfb39cf321a).ode_config.contact_surface_layer;
    02157         config.contact_max_correcting_vel  = srv.[response](../../gazebo_msgs/html/structgazebo__msgs_1_1GetPhysicsProperties.html#aef0d0e922e15a50ec7d09bfb39cf321a).ode_config.contact_max_correcting_vel;
    02158         config.cfm                         = srv.[response](../../gazebo_msgs/html/structgazebo__msgs_1_1GetPhysicsProperties.html#aef0d0e922e15a50ec7d09bfb39cf321a).ode_config.cfm;
    02159         config.erp                         = srv.[response](../../gazebo_msgs/html/structgazebo__msgs_1_1GetPhysicsProperties.html#aef0d0e922e15a50ec7d09bfb39cf321a).ode_config.erp;


Sorry, something went wrong.


#  [ How to add multiple HWSim instances in gazebo?
](//gazebo214.rssing.com/chan-57893035/latest-article12-live.php)


[ Sign in ](/login?return_to=https%3A%2F%2Fgithub.com%2Fros-
simulation%2Fgazebo_ros_pkgs%2Fissues%2F93)


    ../catkin_ws/src
        /MYROBOT_description
            package.xml
            CMakeLists.txt
            model.config
            /urdf
                MYROBOT.urdf
            /meshes
                mesh1.dae
                mesh2.dae
                ...
            /materials
            /plugins
            /cad


**[ kev-the-dev ](/kev-the-dev) ** commented  Jun 12, 2018


Though the ` -J ` argument work, it does not work properly! On certain joint
values robot just start jiggling. I had to do a lot of trials to find out
joint values such that the robot doesn't jiggle on unpausing the simulation.

---

👍  5  Robotawi, coolcat647, YuHoChau, HiroIshida, and hyufu reacted with
thumbs up emoji


[ ↂ
](////lists288.rssing.com/chan-11077187/article374.html#c11077187a374i164684108
"Top 20 Hot and Sexy Dragon Ball Z Girls \(Characters\)")


[ Claim  ](javascript:; "Claim Chan")


#  [ Spawning multiple models causes error
](//gazebo214.rssing.com/chan-57893035/latest-article29-live.php)


The second method of spawning robots into Gazebo allows you to include your
robot within the ` .world ` file, which seems cleaner and more convenient but
also requires you to add your robot to the Gazebo model database by setting an
environment variable. This environment variable is required because of the
separation of ROS dependencies from Gazebo; URDF package paths cannot be used
directly inside ` .world ` files because Gazebo does not have a notion of ROS
packages.


RSSing.com


April 11, 2024, 5:07 am


[ _≫_ Next: Ground truth map for a gazebo world like the willowgarage model
](//gazebo214.rssing.com/chan-57893035/latest.php#c57893035a6953 "Next
Article")


Normally the default values for these arguments are all you need, but just as
an example:


**See the section below to view this full world file on your computer.**


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


I also did some experiments with ` issue_93_set_joint_position_hack_indigo `
branch.


[/world/default/state] [Msg] Serving full state (async) on
[/world/default/state_async] [Msg] Publishing scene information on
[/world/default/scene/info] [Msg] Publishing entity deletions on
[/world/default/scene/deletion] [Msg] Publishing state changes on
[/world/default/state] [Msg] Publishing pose messages on
[/world/default/pose/info] [Msg] Publishing dynamic pose messages on
[/world/default/dynamic_pose/info] [GUI] [Wrn] [Application.cc:797] [QT]
file::/Gazebo/GazeboDrawer.qml:147:3: QML Dialog: Binding loop detected for
property "implicitHeight" [Dbg] [EntityComponentManager.cc:1587] Updated state
thread iterators: 8 threads processing around 1 entities each. [Wrn]
[Component.hh:144] Trying to serialize component with data type
[N3sdf3v125WorldE], which doesn't have `operator>`. Component will not be
deserialized. from what i can see the only difference between the Two is this
line, that gazebo doesn't reach when it has the plugin enabled. [Dbg]
[EntityComponentManager.cc:1587] Updated state thread iterators: 8 threads
processing around 1 entities each.


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


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


[ ](javascript:; "Ouch") 0


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


[ @musamarcusso ](https://github.com/musamarcusso) I am using Gazebo 7.15.
What worked for you exactly? I have got the workaround working to reset the
robot to a position following [ littlejonyang's ](https://github.com/ros-
simulation/gazebo_ros_pkgs/issues/93#issuecomment-371039852) method but it is
not snapping to position.


Unlike for SDFs, no version is required for the  tag when it is used for
URDFs. See the Gazebo Model Database documentation for more info.


Collaborator


##  Creating your own Gazebo ROS Package


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


![Woman is 21st murder victim](//barbadostoday.bb/wp-
content/uploads/2019/04/MG_3723.jpg)


[ @littlejohnyang ](https://github.com/littlejohnyang) Did you manage to
resolve this? I also want the robot to be able to snap back to position.

---

All reactions


All reactions


RSSing.com


Good morning, I open this question as I have not found a way to get the
`model_entity` that collides with the `gpu_lidar` sensor. I would like to be
able to attach with such entity, but I can't know its name and location a
priori. The only info I have is the relative distance from the lidar sensor
msg. **Is there any way to get the first mesh to collide with the ray of the
gpu_lidar and subsequently trace back to the link to create a detachable
joint?**


> Terminate launch script when gzclient (user interface window) exits (default
> false)


[ ![@MatthijsBurgh](https://avatars.githubusercontent.com/u/18014833?s=40&v=4)
](/MatthijsBurgh) [ MatthijsBurgh ](/MatthijsBurgh) mentioned this issue  Apr
21, 2022


You can insert additional models into your robot's world file and use the `
File->Save ` As command to export your edited world back into your ROS
package.


###  [ JasperLoader Emerges, Targets Italy with Gootkit Banking Trojan
](////talos181.rssing.com/chan-58296078/article541.html#c58296078a541i381855922)


Copy link


[ _≫_ Next: Failed to load gz-sim-diff-drive-system
](//gazebo214.rssing.com/chan-57893035/latest.php#c57893035a6943 "Next
Article")


Contributor


[ ](javascript:; "Ouch") 0


We will assume your ROS workspace file hierarchy is setup as described in the
above sections. The only difference is that now a ` model.config ` file is
added to your ` MYROBOT_description ` package like so:


> Tells ROS nodes asking for time to get the Gazebo-published simulation time,
> published over the ROS topic /clock (default true)


  * [ Terms ](https://docs.github.com/site-policy/github-terms/github-terms-of-service)
  * [ Privacy ](https://docs.github.com/site-policy/privacy-policies/github-privacy-statement)
  * [ Security ](/security)
  * [ Status ](https://www.githubstatus.com/)
  * [ Docs ](https://docs.github.com/)
  * [ Contact ](https://support.github.com?tags=dotcom-footer)
  * Manage cookies
  * Do not share my personal information


And clicking the "Insert" tab on the left. You will probably see several
different drop down lists that represent different model databases available
on your system, including the online database. Find the database corresponding
to your robot, open the sub menu, click on the name of your robot and then
choose a location within Gazebo to place the robot, using your mouse.


    01869       }
    01870       else
    01871       {
    01872         [ROS_ERROR](../../../api/rosconsole/html/macros__generated_8h.html#a7fb635b03cc608284eadecd2f8becd9a)("SetLinkState: reference_frame is not a valid link name");
    01873         res.[success](../../gazebo_msgs/html/structgazebo__msgs_1_1SetLinkStateResponse__.html#a9ddd44a499fd3f5e117637729474e969) = false;
    01874         res.[status_message](../../gazebo_msgs/html/structgazebo__msgs_1_1SetLinkStateResponse__.html#a599d42bb7063ff3f9139767cd62f3c10) = "SetLinkState: failed";
    01875         return false;
    01876       }
    01877       //target_pose.rot.Normalize();
    01878
    01879       //std::cout << " debug : " << target_pose << std::endl;
    01880       //boost::recursive_mutex::scoped_lock lock(*Simulator::Instance()->GetMRMutex());
    01881
    01882       bool is_paused = gazebo::Simulator::Instance()->IsPaused();
    01883       if (!is_paused) gazebo::Simulator::Instance()->SetPaused(true);
    01884       body->SetWorldPose(target_pose);
    01885       gazebo::Simulator::Instance()->SetPaused(is_paused);
    01886
    01887       // set body velocity to desired twist
    01888       body->SetLinearVel(target_linear_vel);
    01889       body->SetAngularVel(target_angular_vel);
    01890
    01891       res.[success](../../gazebo_msgs/html/structgazebo__msgs_1_1SetLinkStateResponse__.html#a9ddd44a499fd3f5e117637729474e969) = true;
    01892       res.[status_message](../../gazebo_msgs/html/structgazebo__msgs_1_1SetLinkStateResponse__.html#a599d42bb7063ff3f9139767cd62f3c10) = "SetLinkState: success";
    01893       return true;
    01894     }
    01895
    [01898](classGazeboROSNode.html#af125e45d7f68a069b5da99ee60704ca5)     void [updateLinkState](classGazeboROSNode.html#af125e45d7f68a069b5da99ee60704ca5)(const [gazebo_msgs::LinkState::ConstPtr](../../gazebo_msgs/html/structgazebo__msgs_1_1LinkState__.html#af02e97b8b216c5e728fa2cf44da98e71)& link_state)
    01899     {
    01900       gazebo::Body* body = dynamic_cast<gazebo::Body*>(gazebo::World::Instance()->GetEntityByName(link_state->link_name));
    01901       gazebo::Body* frame = dynamic_cast<gazebo::Body*>(gazebo::World::Instance()->GetEntityByName(link_state->reference_frame));
    01902       if (!body)
    01903       {
    01904         [ROS_ERROR](../../../api/rosconsole/html/macros__generated_8h.html#a7fb635b03cc608284eadecd2f8becd9a)("SetLinkState: link [%s] does not exist",link_state->link_name.c_str());
    01905         return;
    01906       }
    01907       else
    01908       {
    01910         // get reference frame (body/model(link)) pose and
    01911         // transform target pose to absolute world frame


[ ↂ
](////dailyentertainmentnews33.rssing.com/chan-41166720/article94.html#c41166720a94i1969999888
"Meet Peter Nygard Girlfriends & Children")


Hi all, I'm trying to install a lidar on a drone (x500, model provided by PX4
repo). I found several examples, but all seems outdated. For the plugin, an
example give the name of `libgazebo_ros_ray_sensor.so`, another
`libgazebo_ros_laser.so`. Some doc points to https://github.com/ros-
simulation/gazebo_ros_pkgs to get the plugin, but the list of available branch
is huge, and I already installed libgz-sim7-plugins on my machine (which
contains `libgz-sensors7-lidar.so` that "does not export any plugins"). Well
I'm totally lost ! Which plugin should I used ? I'm using gazebo garden on
ubuntu 22.04. Here is part of my sdf file  model://x500  [...]  0 0 0 0 0 0
[...]  0 0 0.3 0 0 1.57  [...]  /spur/laser/scan  /hokuyo_sensor_link


[ ![@jbohren](https://avatars.githubusercontent.com/u/1253450?s=40&v=4)
](/jbohren) [ jbohren ](/jbohren) closed this as [ completed ](/ros-
simulation/gazebo_ros_pkgs/issues?q=is%3Aissue+is%3Aclosed+archived%3Afalse+reason%3Acompleted)
Oct 21, 2014


This should start baxter with no potential energy in its joints (arms down),
but instead I see Baxter's hands straight out on both sides and they fall when
the simulation starts.

---

All reactions


Sorry, something went wrong.


[…ulation#93](https://github.com/ros-simulation/gazebo_ros_pkgs/issues/93)), sleeping for 1 second to avoid race condition. this branch should only be used for debugging, merge only as a last resort.


roslaunch gazebo_ros empty_world.launch


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


` [ 838241a ](/ros-
simulation/gazebo_ros_pkgs/commit/838241a5806120e17d08b2b79d89264c5aa44a0e) `


    01367         gazebo::Entity* relative_entity = gazebo::World::Instance()->GetEntityByName(req.[model_state](../../gazebo_msgs/html/structgazebo__msgs_1_1SetModelStateRequest__.html#a6a20bccbfd561c02ae793bd41a6742e5).[reference_frame](../../gazebo_msgs/html/structgazebo__msgs_1_1ModelState__.html#aba2a167473d2b4ed3275952deb71cf14));
    01368         if (relative_entity)
    01369         {
    01370           gazebo::Pose3d  frame_pose = relative_entity->GetWorldPose(); // - this->myBody->GetCoMPose();
    01371           gazebo::Vector3 frame_pos = frame_pose.pos;
    01372           gazebo::Quatern frame_rot = frame_pose.rot;
    01373
    01374           //std::cout << " debug : " << relative_entity->GetName() << " : " << frame_pose << " : " << target_pose << std::endl;
    01375           //target_pose = frame_pose + target_pose; // seems buggy, use my own
    01376           target_pose.pos = frame_pos + frame_rot.RotateVector(target_pos);
    01377           target_pose.rot = frame_rot * target_pose.rot;
    01378         }
    01380         else if (req.[model_state](../../gazebo_msgs/html/structgazebo__msgs_1_1SetModelStateRequest__.html#a6a20bccbfd561c02ae793bd41a6742e5).[reference_frame](../../gazebo_msgs/html/structgazebo__msgs_1_1ModelState__.html#aba2a167473d2b4ed3275952deb71cf14) == "" || req.[model_state](../../gazebo_msgs/html/structgazebo__msgs_1_1SetModelStateRequest__.html#a6a20bccbfd561c02ae793bd41a6742e5).[reference_frame](../../gazebo_msgs/html/structgazebo__msgs_1_1ModelState__.html#aba2a167473d2b4ed3275952deb71cf14) == "world" || req.[model_state](../../gazebo_msgs/html/structgazebo__msgs_1_1SetModelStateRequest__.html#a6a20bccbfd561c02ae793bd41a6742e5).[reference_frame](../../gazebo_msgs/html/structgazebo__msgs_1_1ModelState__.html#aba2a167473d2b4ed3275952deb71cf14) == "map" || req.[model_state](../../gazebo_msgs/html/structgazebo__msgs_1_1SetModelStateRequest__.html#a6a20bccbfd561c02ae793bd41a6742e5).[reference_frame](../../gazebo_msgs/html/structgazebo__msgs_1_1ModelState__.html#aba2a167473d2b4ed3275952deb71cf14) == "/map" )
    01381         {
    01382           [ROS_DEBUG](../../../api/rosconsole/html/macros__generated_8h.html#a83228c0b42c80605abdd0f42af64b1f7)("SetModelState: reference frame is empty/world/map, usig inertial frame");
    01383         }
    01384         else
    01385         {
    01386           [ROS_ERROR](../../../api/rosconsole/html/macros__generated_8h.html#a7fb635b03cc608284eadecd2f8becd9a)("SetModelState: for model[%s], specified reference frame entity [%s] does not exist",
    01387                     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(),req.[model_state](../../gazebo_msgs/html/structgazebo__msgs_1_1SetModelStateRequest__.html#a6a20bccbfd561c02ae793bd41a6742e5).[reference_frame](../../gazebo_msgs/html/structgazebo__msgs_1_1ModelState__.html#aba2a167473d2b4ed3275952deb71cf14).c_str());
    01388           res.[success](../../gazebo_msgs/html/structgazebo__msgs_1_1SetModelStateResponse__.html#acca9802bb129cd425a0eeb458fac040e) = false;
    01389           res.[status_message](../../gazebo_msgs/html/structgazebo__msgs_1_1SetModelStateResponse__.html#abe59335014d06188f09f6ef2f91447cb) = "SetModelState: specified reference frame entity does not exist";
    01390           return false;
    01391         }
    01392
    01393         //ROS_ERROR("target state: %f %f %f",target_pose.pos.x,target_pose.pos.y,target_pose.pos.z);
    01394         bool is_paused = gazebo::Simulator::Instance()->IsPaused();
    01395         gazebo::Simulator::Instance()->SetPaused(true);
    01396         model->SetWorldPose(target_pose);
    01397         gazebo::Simulator::Instance()->SetPaused(is_paused);
    01398         //gazebo::Pose3d p3d = model->GetWorldPose();
    01399         //ROS_ERROR("model updated state: %f %f %f",p3d.pos.x,p3d.pos.y,p3d.pos.z);
    01400
    01401         // set model velocity
    01402         model->SetLinearVel(target_pos_dot);
    01403         model->SetAngularVel(target_rot_dot);
    01404
    01405         res.[success](../../gazebo_msgs/html/structgazebo__msgs_1_1SetModelStateResponse__.html#acca9802bb129cd425a0eeb458fac040e) = true;
    01406         res.[status_message](../../gazebo_msgs/html/structgazebo__msgs_1_1SetModelStateResponse__.html#abe59335014d06188f09f6ef2f91447cb) = "SetModelState: set model state done";
    01407         return true;


      <sdf version="1.4">
        <world name="default">
          <include>
            <uri>model://sun</uri>
          </include>
          <include>
            <uri>model://ground_plane</uri>
          </include>
          <include>
            <uri>model://double_pendulum_with_base</uri>
            <name>pendulum_thick_mud</name>
            <pose>-2.0 0 0 0 0 0</pose>
          </include>
          ...
        </world>
      </sdf>


The way it worked for me was to start Gazebo with the physics paused and spawn
the robot (I named it ` the_robot ` below). The important thing was to add the
` -unpause ` option in order to have the joints snapping into position and add
the name of the name of the robot as ` the_robot:: ` as a prefix to each
joint.


**[ felixvd ](/felixvd) ** commented  Jul 9, 2018


[ ↂ
](////topics4280.rssing.com/chan-62228694/article43158.html#c62228694a43158i1887057775
"Wondershare PDFelement v7.x.x Patch v3.4 By Deltafox")


In the end, I added all the transmissions, gazebo_ros_control plugin and
ros_controllers stuff again and started gazebo in "running" mode.....after
running a second ` spawn_model ` , the ` -J ` arguments are applied to the
robot!


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


![Saline County Jail Booking Activity – Thursday, December
10th](//thepost.s3.amazonaws.com/wp-content/uploads/2015/12/Lehoczky-Todd-
Edward-William1-300x203.jpg)


[ ](javascript:; "Ouch") 0


#  [ include model in world 2023
](//gazebo214.rssing.com/chan-57893035/latest-article9-live.php)


Copy link


    00242       case 'r':
    00243         [optRenderEngineEnabled](gazeboros_8cpp.html#a71c88173f8bab8627a31df3b34499bb9) = false;
    00244         break;
    00245
    00246       case 'p':
    00247         [optPhysicsEnabled](gazeboros_8cpp.html#a5dccf1f9607bd91523fab411715874b4) = false;
    00248         break;
    00249
    00250       case 'h':
    00251       default:
    00252         [PrintUsage](gazeboros_8cpp.html#a64d28f49232d9fada3edd46309ab6830)();
    00253         return -1;
    00254     }
    00255   }
    00256
    00257   argc -= optind;
    00258   argv += optind;
    00259
    00260   if (argc < 1 && ![optWorldParam](gazeboros_8cpp.html#ab9308554571f349ac0b75eac34939dd2))
    00261   {
    00262         [ROS_FATAL](../../../api/rosconsole/html/macros__generated_8h.html#af9844cba2577ca518c1f0d23e76bec88)("No world file argument specified");
    00263     [PrintUsage](gazeboros_8cpp.html#a64d28f49232d9fada3edd46309ab6830)();
    00264     return -1;
    00265   }
    00266
    00267   // Get the world file name
    00268   if (argc > 0)
    00269           [worldFileName](gazeboros_8cpp.html#a0fe0d6cba0a8a75e68da5402cb7d928d) = argv[0];
    00270
    00271   return 0;
    00272 }
    00273
    00275 // sighandler to shut everything down properly
    [00276](gazeboros_8cpp.html#a7972e8125628180f0e4d04a8f805ced6) void [SignalHandler](gazeboros_8cpp.html#a7972e8125628180f0e4d04a8f805ced6)( int /*dummy*/ )
    00277 {
    00278   /* wait for every other nodes to shutdown before shutting down gazebo
    00279      FIXME: should only wait for nodes associated with gazebo and plugins, is that even possible?
    00280   ros::V_string nodes;
    00281   ros::master::getNodes(nodes);
    00282   while ((int)nodes.size() > 2)


Also would be useful to have some info on how to debug these paths from the
ROS side, e.g. that you can use ` rospack plugins --attrib="gazebo_media_path"
gazebo_ros ` To check the media path that will be picked up by gazebo.


###  World Files


June 15, 2021, 1:21 am


![5 Dromlee Crescent, Beaumont, Dublin 9 -
€399,950](//photos-a.propertyimages.ie/media/9/1/6/3382619/e9276a2d-0ce4-4db4-bd26-f758a44477dd_l.jpg)


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


  * **/home/user/catkin_workspace/src** \- this is treated as the location of a Gazebo Model Database
  * **/MYROBOT_description** \- this directory is treated as a single Gazebo model folder
  * **model.config** \- this is a required configuration file for Gazebo to find this model in its database
  * **MYROBOT.urdf** \- this is your robot description file, also used by Rviz, MoveIt!, etc
  * **/meshes** \- put your .stl or .dae files in here, just as you would with regular URDFs


` [ ef848cb ](/ros-
simulation/gazebo_ros_pkgs/commit/ef848cb8265f7c76fc201a0d69cb387c11b0436c) `


[ gazebo ](http://ros.org/wiki/gazebo)
Author(s): Nate Koenig, Andrew Howard, with contributions from many others.
See web page for a full credits llist.  autogenerated on Sat Mar 2 13:39:02
2013


[ X ](javascript:;) Are you the publisher? [ Claim
](//www.rssing.com/account.php?a=mmc&r=57893035) or [ contact us
](//www.rssing.com/contact.php?a=ssm&r=o5&u=//gazebo214.rssing.com/chan-57893035/latest.php)
about this channel.


Closed


[ hsu ](/hsu) added a commit that referenced this issue  Sep 1, 2014


Contributor


Channel: Gazebo: Q&A Forum - RSS feed


[ 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)


` [ db0587c ](/jhu-lcsr-
forks/gazebo_ros_pkgs/commit/db0587cfca8003e218eee8540f34dbfc9eab9ca9) `


####  Finding World Files On Your Computer


[ _≫_ Next: Gazebo Fortress Custom plugins causing scene to not load
](//gazebo214.rssing.com/chan-57893035/latest.php#c57893035a6935 "Next
Article")


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


####  model.config


* Solutions


[ ](javascript:; "Like") 0


[ ↂ
](////ngemu1.rssing.com/chan-25253293/article13362.html#c25253293a13362i1209846253
"Epsxe On-screen Gamepad skins \(For Android\)")


    01542     }
    [01543](classGazeboROSNode.html#aa9b304e861549696923ab5b03ea84ae0)     bool [clearJointForces](classGazeboROSNode.html#a79ad3a609931f0e04b497126d5ae49d7)(std::string joint_name)
    01544     {
    01545       bool [search](../../../api/roscpp/html/namespaceros_1_1param.html#a1e965b3e54361ce6aec27df988965425) = true;
    01546       this->[lock_](classGazeboROSNode.html#a3895043c9355e3e2a23f84efe0060736 "A mutex to lock access to fields that are used in ROS message callbacks.").lock();
    01547       while(search)
    01548       {
    01549         search = false;
    01550         for (std::vector<GazeboROSNode::ForceJointJob*>::iterator iter=this->[force_joint_jobs](classGazeboROSNode.html#a22ab41eec754d289d8c56f05045f480e).begin();iter!=this->[force_joint_jobs](classGazeboROSNode.html#a22ab41eec754d289d8c56f05045f480e).end();iter++)
    01551         {
    01552           if ((*iter)->joint->GetName() == joint_name)
    01553           {
    01554             // found one, search through again
    01555             search = true;
    01556             delete (*iter);
    01557             this->[force_joint_jobs](classGazeboROSNode.html#a22ab41eec754d289d8c56f05045f480e).erase(iter);
    01558             break;
    01559           }
    01560         }
    01561       }
    01562       this->[lock_](classGazeboROSNode.html#a3895043c9355e3e2a23f84efe0060736 "A mutex to lock access to fields that are used in ROS message callbacks.").unlock();
    01563       return true;
    01564     }
    01565
    [01568](classGazeboROSNode.html#a8434da6f0a95fe58cceaf5518c906a8b)     bool [clearBodyWrenches](classGazeboROSNode.html#a8434da6f0a95fe58cceaf5518c906a8b)([gazebo_msgs::BodyRequest::Request](../../gazebo_msgs/html/structgazebo__msgs_1_1BodyRequestRequest__.html) &req,[gazebo_msgs::BodyRequest::Response](../../gazebo_msgs/html/structgazebo__msgs_1_1BodyRequestResponse__.html) &res)
    01569     {
    01570       return this->[clearBodyWrenches](classGazeboROSNode.html#a8434da6f0a95fe58cceaf5518c906a8b)(req.[body_name](../../gazebo_msgs/html/structgazebo__msgs_1_1BodyRequestRequest__.html#a60de029992633ee1bd700fc6e6d5cd95));
    01571     }
    [01572](classGazeboROSNode.html#abbde137ee10f1211fc262720e10432b1)     bool [clearBodyWrenches](classGazeboROSNode.html#a8434da6f0a95fe58cceaf5518c906a8b)(std::string body_name)
    01573     {
    01574       bool [search](../../../api/roscpp/html/namespaceros_1_1param.html#a1e965b3e54361ce6aec27df988965425) = true;
    01575       this->[lock_](classGazeboROSNode.html#a3895043c9355e3e2a23f84efe0060736 "A mutex to lock access to fields that are used in ROS message callbacks.").lock();
    01576       while(search)
    01577       {
    01578         search = false;
    01579         for (std::vector<GazeboROSNode::WrenchBodyJob*>::iterator iter=this->[wrench_body_jobs](classGazeboROSNode.html#ade2831b1970d2ceed871e82a9140c2bb).begin();iter!=this->[wrench_body_jobs](classGazeboROSNode.html#ade2831b1970d2ceed871e82a9140c2bb).end();iter++)
    01580         {
    01581           //ROS_ERROR("search %s %s",(*iter)->body->GetScopedName().c_str(), body_name.c_str());
    01582           if ((*iter)->body->GetScopedName() == body_name)
    01583           {


Toggle navigation  [
![gazebo](/assets/masthead-0bd44817978df8069f427d8ca1657998789065a2b242edfd1a3d8ab4a329dd4c.png)
](/)


Hi Daniel,


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


#  [ Ground truth map for a gazebo world like the willowgarage model
](//gazebo214.rssing.com/chan-57893035/latest-article28-live.php)


All reactions


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


###  [ Wondershare PDFelement v7.x.x Patch v3.4 By Deltafox
](////topics4280.rssing.com/chan-62228694/article43158.html#c62228694a43158i1887057775)


> The first method keeps your robot's ROS packages more portable between
> computers and repository check outs. It allows you to keep your robot's
> location relative to a ROS package path, but also requires you to make a ROS
> service call using a small (python) script.


No milestone


Hi, I'm new to gazebo and ROS, I apolagize if my question may not make sens,
I'm currently looking for a way to simulate suction or vacuum like effect ,
(not to pick object) it's more of a vaccuming arm (industrial vacuum cleaner
with articulated arm for dust/unwanted materiel collection). It's more of
something like this: ![image description](/upfiles/16237440914049427.jpg) or
like this: ![image description](/upfiles/16237441254928754.jpg) Is there a way
to control air/wind localy (pressure , wind direction...) on a robot model in
gazebo? I would really appreciate if you have any insight on the subject.
Thanks in advance.


  * [ Login  ](//www.rssing.com/account.php?a=lgi&t=%2F%2Fgazebo214.rssing.com%2Fchan-57893035%2Flatest.php)
    * [ Account ](//www.rssing.com/account.php)
    * [ Sign Up ](//www.rssing.com/account.php?a=reg&t=%2F%2Fgazebo214.rssing.com%2Fchan-57893035%2Flatest.php)


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


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


The ability to specify initial joint positions is still broken in the current
gazebo_ros_pkgs - any idea why [ @hsu ](https://github.com/hsu) ? Thanks!

---

All reactions


RSSing.com


[ ](//www.rssing.com/index.php "Home")


[ ](javascript:; "Like") 0


You can append the following arguments to the launch files to change the
behavior of Gazebo:


[ ![People's Blog • First Pictures of the Eclipse ! !
!](//thepeoplescube.com/red/download/file.php?id=57243&sid=d61d4527be50ef499d8f3761aad83688)
](////satire6144.rssing.com/chan-78334822/article122.html#c78334822a122i1295535114)


[ Start gazebo paused to set joint positions  tue-robotics/hero_bringup#108
](/tue-robotics/hero_bringup/pull/108)


[ ↂ
](////salawats2.rssing.com/chan-11490042/article47.html#c11490042a47i371003744
"Duas for Difficulties, Ism Adham-'Allah’s Greatest Name' and Secrets of Ya
Hayyu Ya Qayyum")


    00119 #include <[gazebo_msgs/SetModelConfiguration.h](../../gazebo_msgs/html/SetModelConfiguration_8h.html)>
    00120 #include <boost/shared_ptr.hpp>
    00121 #include <boost/algorithm/string.hpp>
    00122
    00123 #include <[tf/transform_broadcaster.h](../../../api/tf/html/transform__broadcaster_8h.html)>
    00124
    00125 // Command line options
    [00126](gazeboros_8cpp.html#a0fe0d6cba0a8a75e68da5402cb7d928d) const char *[worldFileName](gazeboros_8cpp.html#a0fe0d6cba0a8a75e68da5402cb7d928d);
    [00127](gazeboros_8cpp.html#a49afbe9dab29f25cb7bbdcbc43e1cc05) const char *[optLogFileName](gazeboros_8cpp.html#a49afbe9dab29f25cb7bbdcbc43e1cc05) = NULL;
    [00128](gazeboros_8cpp.html#a22e4bc9ab344d8cb4155a232dbd1266f) unsigned int [optServerId](gazeboros_8cpp.html#a22e4bc9ab344d8cb4155a232dbd1266f) = 0;
    [00129](gazeboros_8cpp.html#adc9894c527a63384517475863c196995) bool [optServerForce](gazeboros_8cpp.html#adc9894c527a63384517475863c196995) = true;
    [00130](gazeboros_8cpp.html#ab8c4575115b7da32322fd180490d291d) bool [optGuiEnabled](gazeboros_8cpp.html#ab8c4575115b7da32322fd180490d291d) = true;
    [00131](gazeboros_8cpp.html#a71c88173f8bab8627a31df3b34499bb9) bool [optRenderEngineEnabled](gazeboros_8cpp.html#a71c88173f8bab8627a31df3b34499bb9) = true;
    [00132](gazeboros_8cpp.html#a3de449cbe56d0aacff20ccd18678cd9a) double [optTimeout](gazeboros_8cpp.html#a3de449cbe56d0aacff20ccd18678cd9a) = -1;
    [00133](gazeboros_8cpp.html#a0fb92fe3e724133ffc57d6d48aca3aa3) unsigned int [optMsgLevel](gazeboros_8cpp.html#a0fb92fe3e724133ffc57d6d48aca3aa3) = 1;
    [00134](gazeboros_8cpp.html#abfd3d09b83f2677012a352aa7f4bed7c) int [optTimeControl](gazeboros_8cpp.html#abfd3d09b83f2677012a352aa7f4bed7c) = 1;
    [00135](gazeboros_8cpp.html#a5dccf1f9607bd91523fab411715874b4) bool [optPhysicsEnabled](gazeboros_8cpp.html#a5dccf1f9607bd91523fab411715874b4)  = true;
    [00136](gazeboros_8cpp.html#a3697e95c8066e4952f3881c731f9e731) bool [optPaused](gazeboros_8cpp.html#a3697e95c8066e4952f3881c731f9e731) = false;
    [00137](gazeboros_8cpp.html#ab9308554571f349ac0b75eac34939dd2) bool [optWorldParam](gazeboros_8cpp.html#ab9308554571f349ac0b75eac34939dd2) = false;
    [00138](gazeboros_8cpp.html#ae990d80121edf87093d3df50d6e54ffc) const char *[worldParamName](gazeboros_8cpp.html#ae990d80121edf87093d3df50d6e54ffc) = NULL;
    [00139](gazeboros_8cpp.html#a332ee20fb7d46d2b771c88303d3c45aa) std::string [worldParamData](gazeboros_8cpp.html#a332ee20fb7d46d2b771c88303d3c45aa);
    [00140](gazeboros_8cpp.html#a511ffb65b36a4472dbfdbd6e3139f032) bool [optOgreLog](gazeboros_8cpp.html#a511ffb65b36a4472dbfdbd6e3139f032) = false;
    00141
    00143 // TODO: Implement these options
    [00144](gazeboros_8cpp.html#a64d28f49232d9fada3edd46309ab6830) void [PrintUsage](gazeboros_8cpp.html#a64d28f49232d9fada3edd46309ab6830)()
    00145 {
    00146   fprintf(stderr, "Usage: gazeboros [-hv] <worldfile>\n");
    00147   fprintf(stderr, "  -h            : Print this message.\n");
    00148   fprintf(stderr, "  -s <id>       : Use server id <id> (an integer); default is 0. If <0, shared memory iface disabled\n");
    00149   fprintf(stderr, "  -f            : Force usage of the server id (use with caution)\n");
    00150   fprintf(stderr, "  -d <-1:9>      : Verbose mode: -1 = none, 0 = critical (default), 9 = all)\n");
    00151   fprintf(stderr, "  -t <sec>      : Timeout and quit after <sec> seconds\n");
    00152   fprintf(stderr, "  -g            : Run without a GUI\n");
    00153   fprintf(stderr, "  -r            : Run without a rendering engine\n");
    00154   fprintf(stderr, "  -l <logfile>  : Log to indicated file.\n");
    00155   fprintf(stderr, "  -n            : Do not do any time control\n");
    00156   fprintf(stderr, "  -p            : Run without physics engine\n");
    00157   fprintf(stderr, "  -u            : Start the simulation paused\n");
    00158   fprintf(stderr, "  -w <param>    : World file ROS parameter name\n");
    00159   fprintf(stderr, "  -o            : Create an Ogre.log file\n");


Copy link


rosrun gazebo_ros spawn_model -h


    * [ CI/CD & Automation ](/solutions/ci-cd/)
    * [ DevOps ](/solutions/devops/)
    * [ DevSecOps  ](https://resources.github.com/devops/fundamentals/devsecops/)


Query


Development


[ _≪_ Previous: Explain 'Exporting model paths from a package.xml section' of
'Using roslaunch to start Gazebo' tutorial on Gazebo-Classic
](//gazebo214.rssing.com/chan-57893035/latest.php#c57893035a6952 "Previous
Article")


###  [ Fake lip ring, silver lip ring, simple lip ring, unisex lip ring by
AIRlab
](////kuteriot1.rssing.com/chan-5865851/article17035.html#c5865851a17035i913072506)


    01706       // take axis rotation and turn it int a quaternion
    01707       gazebo::Quatern rotation; rotation.SetFromAxis(axis.x,axis.y,axis.z,dangle);
    01708       // rotate relative pose by rotation
    01709       gazebo::Pose3d new_relative_pose;
    01710       new_relative_pose.pos = rotation.RotateVector(relative_pose.pos);
    01711       new_relative_pose.rot = rotation * relative_pose.rot;
    01712       gazebo::Pose3d new_world_pose(new_relative_pose.pos+anchor,new_relative_pose.rot);
    01713       body1->SetWorldPose(new_world_pose);
    01714       // std::cout << "      body[" << body1->GetName()
    01715       //           << "] wp[" << world_pose
    01716       //           << "] anchor[" << anchor
    01717       //           << "] axis[" << axis
    01718       //           << "] dangle [" << dangle
    01719       //           << "]\n";
    01720
    01721       // recurse through children bodies
    01722       std::vector<gazebo::Body*> bodies;
    01723       if (update_children) [getAllChildrenBodies](classGazeboROSNode.html#af403122a7a4f56cc1711e2644048caa8)(bodies, body1->GetModel(), body1);
    01724       for (std::vector<gazebo::Body*>::iterator bit = bodies.begin(); bit != bodies.end(); bit++)
    01725         [rotateBodyAndChildren](classGazeboROSNode.html#ad672f69bc97ccbd478c0406402ccd3e8)((*bit), anchor, axis, dangle,false);
    01726
    01727     }
    01728
    [01729](classGazeboROSNode.html#a5489b398b9b99702d5d682ca523e2062)     void [slideBodyAndChildren](classGazeboROSNode.html#a5489b398b9b99702d5d682ca523e2062)(gazebo::Body* body1, gazebo::Vector3 anchor, gazebo::Vector3 axis, double dposition, bool update_children = true)
    01730     {
    01731       gazebo::Pose3d world_pose = body1->GetWorldPose();
    01732       gazebo::Pose3d relative_pose(world_pose.pos - anchor,world_pose.rot); // relative to anchor point
    01733       // slide relative pose by dposition along axis
    01734       gazebo::Pose3d new_relative_pose;
    01735       new_relative_pose.pos = relative_pose.pos + axis * dposition;
    01736       new_relative_pose.rot = relative_pose.rot;
    01737       gazebo::Pose3d new_world_pose(new_relative_pose.pos+anchor,new_relative_pose.rot);
    01738       body1->SetWorldPose(new_world_pose);
    01739       // std::cout << "      body[" << body1->GetName()
    01740       //           << "] wp[" << world_pose
    01741       //           << "] anchor[" << anchor
    01742       //           << "] axis[" << axis
    01743       //           << "] dposition [" << dposition
    01744       //           << "]\n";
    01745


    01492         if (fjj->[start_time](classGazeboROSNode_1_1ForceJointJob.html#a1a6abca9e598c0860f79c9f86a440cde) < [ros::Time](../../../api/rostime/html/classros_1_1Time.html)(gazebo::Simulator::Instance()->GetSimTime().Double()))
    01493           fjj->[start_time](classGazeboROSNode_1_1ForceJointJob.html#a1a6abca9e598c0860f79c9f86a440cde) = [ros::Time](../../../api/rostime/html/classros_1_1Time.html)(gazebo::Simulator::Instance()->GetSimTime().Double());
    01494         fjj->[duration](classGazeboROSNode_1_1ForceJointJob.html#abb80ad252fc707d94ab89aeb4dc93a72) = req.[duration](../../gazebo_msgs/html/structgazebo__msgs_1_1ApplyJointEffortRequest__.html#a86fa0672e092557ed503b1a2447d7d64);
    01495         this->[lock_](classGazeboROSNode.html#a3895043c9355e3e2a23f84efe0060736 "A mutex to lock access to fields that are used in ROS message callbacks.").lock();
    01496         this->[force_joint_jobs](classGazeboROSNode.html#a22ab41eec754d289d8c56f05045f480e).push_back(fjj);
    01497         this->[lock_](classGazeboROSNode.html#a3895043c9355e3e2a23f84efe0060736 "A mutex to lock access to fields that are used in ROS message callbacks.").unlock();
    01498
    01499         res.[success](../../gazebo_msgs/html/structgazebo__msgs_1_1ApplyJointEffortResponse__.html#a4fe78ed7323ef413512b16b9f3f9a9bf) = true;
    01500         res.[status_message](../../gazebo_msgs/html/structgazebo__msgs_1_1ApplyJointEffortResponse__.html#a7b23717c14f723390bb7e8d243f5f481) = "ApplyJointEffort: effort set";
    01501         return true;
    01502       }
    01503     }
    01504
    [01507](classGazeboROSNode.html#ae6b30b92ee4b069ba4e19a27977d8cb7)     bool [resetSimulation](classGazeboROSNode.html#ae6b30b92ee4b069ba4e19a27977d8cb7)(std_srvs::Empty::Request &req,std_srvs::Empty::Response &res)
    01508     {
    01509       gazebo::World::Instance()->Reset();
    01510       return true;
    01511     }
    01512
    [01515](classGazeboROSNode.html#a4a05b280a7e117b0095290ae85eeecbf)     bool [resetWorld](classGazeboROSNode.html#a4a05b280a7e117b0095290ae85eeecbf)(std_srvs::Empty::Request &req,std_srvs::Empty::Response &res)
    01516     {
    01517       gazebo::World::Instance()->Reset();
    01518       return true;
    01519     }
    01520
    [01523](classGazeboROSNode.html#a3e63eeecd943a46eca541db419225057)     bool [pausePhysics](classGazeboROSNode.html#a3e63eeecd943a46eca541db419225057)(std_srvs::Empty::Request &req,std_srvs::Empty::Response &res)
    01524     {
    01525       gazebo::Simulator::Instance()->SetPaused(true);
    01526       return true;
    01527     }
    01528
    [01531](classGazeboROSNode.html#a0f60ede81f5e148d181c064347aad047)     bool [unpausePhysics](classGazeboROSNode.html#a0f60ede81f5e148d181c064347aad047)(std_srvs::Empty::Request &req,std_srvs::Empty::Response &res)
    01532     {
    01533       gazebo::Simulator::Instance()->SetPaused(false);
    01534       return true;
    01535     }
    01536
    [01539](classGazeboROSNode.html#a79ad3a609931f0e04b497126d5ae49d7)     bool [clearJointForces](classGazeboROSNode.html#a79ad3a609931f0e04b497126d5ae49d7)([gazebo_msgs::JointRequest::Request](../../gazebo_msgs/html/structgazebo__msgs_1_1JointRequestRequest__.html) &req,[gazebo_msgs::JointRequest::Response](../../gazebo_msgs/html/structgazebo__msgs_1_1JointRequestResponse__.html) &res)
    01540     {
    01541       return this->[clearJointForces](classGazeboROSNode.html#a79ad3a609931f0e04b497126d5ae49d7)(req.[joint_name](../../gazebo_msgs/html/structgazebo__msgs_1_1JointRequestRequest__.html#aa1c78f9b5da9d8e30766859945634ada));


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


    00528
    00529       // Advertise more services on the custom queue
    00530       std::string reset_world_service_name("reset_world");
    00531       [ros::AdvertiseServiceOptions](../../../api/roscpp/html/structros_1_1AdvertiseServiceOptions.html) reset_world_aso = ros::AdvertiseServiceOptions::create<std_srvs::Empty>(
    00532           reset_world_service_name,boost::bind(&[GazeboROSNode::resetWorld](classGazeboROSNode.html#a4a05b280a7e117b0095290ae85eeecbf),this,_1,_2),
    00533           ros::VoidPtr(), &this->[gazebo_queue_](classGazeboROSNode.html#aaad18c9d54a8736ea6337821de03889a));
    00534       [reset_world_service_](classGazeboROSNode.html#a3ff4a2cb807ac60b5a331f084120f74d) = this->[rosnode_](classGazeboROSNode.html#ae9011736edb2ec542d7176cdddeb546d).[advertiseService](../../../api/roscpp/html/classros_1_1NodeHandle.html#ae659319707eb40e8ef302763f7d632da)(reset_world_aso);
    00535
    00536       // Advertise more services on the custom queue
    00537       std::string pause_physics_service_name("pause_physics");
    00538       [ros::AdvertiseServiceOptions](../../../api/roscpp/html/structros_1_1AdvertiseServiceOptions.html) pause_physics_aso = ros::AdvertiseServiceOptions::create<std_srvs::Empty>(
    00539           pause_physics_service_name,boost::bind(&[GazeboROSNode::pausePhysics](classGazeboROSNode.html#a3e63eeecd943a46eca541db419225057),this,_1,_2),
    00540           ros::VoidPtr(), &this->[gazebo_queue_](classGazeboROSNode.html#aaad18c9d54a8736ea6337821de03889a));
    00541       [pause_physics_service_](classGazeboROSNode.html#a02800aa046c0cb9bd436bd1407d00e5f) = this->[rosnode_](classGazeboROSNode.html#ae9011736edb2ec542d7176cdddeb546d).[advertiseService](../../../api/roscpp/html/classros_1_1NodeHandle.html#ae659319707eb40e8ef302763f7d632da)(pause_physics_aso);
    00542
    00543       // Advertise more services on the custom queue
    00544       std::string unpause_physics_service_name("unpause_physics");
    00545       [ros::AdvertiseServiceOptions](../../../api/roscpp/html/structros_1_1AdvertiseServiceOptions.html) unpause_physics_aso = ros::AdvertiseServiceOptions::create<std_srvs::Empty>(
    00546           unpause_physics_service_name,boost::bind(&[GazeboROSNode::unpausePhysics](classGazeboROSNode.html#a0f60ede81f5e148d181c064347aad047),this,_1,_2),
    00547           ros::VoidPtr(), &this->[gazebo_queue_](classGazeboROSNode.html#aaad18c9d54a8736ea6337821de03889a));
    00548       [unpause_physics_service_](classGazeboROSNode.html#a29a3c7cd81b53e4d44e9df9a9148336c) = this->[rosnode_](classGazeboROSNode.html#ae9011736edb2ec542d7176cdddeb546d).[advertiseService](../../../api/roscpp/html/classros_1_1NodeHandle.html#ae659319707eb40e8ef302763f7d632da)(unpause_physics_aso);
    00549
    00550       // Advertise more services on the custom queue
    00551       std::string clear_joint_forces_service_name("clear_joint_forces");
    00552       [ros::AdvertiseServiceOptions](../../../api/roscpp/html/structros_1_1AdvertiseServiceOptions.html) clear_joint_forces_aso = ros::AdvertiseServiceOptions::create<gazebo_msgs::JointRequest>(
    00553           clear_joint_forces_service_name,boost::bind(&[GazeboROSNode::clearJointForces](classGazeboROSNode.html#a79ad3a609931f0e04b497126d5ae49d7),this,_1,_2),
    00554           ros::VoidPtr(), &this->[gazebo_queue_](classGazeboROSNode.html#aaad18c9d54a8736ea6337821de03889a));
    00555       [clear_joint_forces_service_](classGazeboROSNode.html#ad766fc703dd022e87b4270aaf941da3b) = this->[rosnode_](classGazeboROSNode.html#ae9011736edb2ec542d7176cdddeb546d).[advertiseService](../../../api/roscpp/html/classros_1_1NodeHandle.html#ae659319707eb40e8ef302763f7d632da)(clear_joint_forces_aso);
    00556
    00557       // Advertise more services on the custom queue
    00558       std::string clear_body_wrenches_service_name("clear_body_wrenches");
    00559       [ros::AdvertiseServiceOptions](../../../api/roscpp/html/structros_1_1AdvertiseServiceOptions.html) clear_body_wrenches_aso = ros::AdvertiseServiceOptions::create<gazebo_msgs::BodyRequest>(
    00560           clear_body_wrenches_service_name,boost::bind(&[GazeboROSNode::clearBodyWrenches](classGazeboROSNode.html#a8434da6f0a95fe58cceaf5518c906a8b),this,_1,_2),
    00561           ros::VoidPtr(), &this->[gazebo_queue_](classGazeboROSNode.html#aaad18c9d54a8736ea6337821de03889a));
    00562       [clear_body_wrenches_service_](classGazeboROSNode.html#a3606e1466660e6b43cecee7b3c246050) = this->[rosnode_](classGazeboROSNode.html#ae9011736edb2ec542d7176cdddeb546d).[advertiseService](../../../api/roscpp/html/classros_1_1NodeHandle.html#ae659319707eb40e8ef302763f7d632da)(clear_body_wrenches_aso);
    00563
    00564       // Advertise topic on custom queue
    00565       // topic callback version for set_link_state
    00566       [ros::SubscribeOptions](../../../api/roscpp/html/structros_1_1SubscribeOptions.html) link_state_so = ros::SubscribeOptions::create<gazebo_msgs::LinkState>(
    00567         "set_link_state",10, boost::bind( &[GazeboROSNode::updateLinkState](classGazeboROSNode.html#af125e45d7f68a069b5da99ee60704ca5),this,_1),


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


![Decoration of the High Command of the Hitler Youth for Distinguished
Foreigners](//4.bp.blogspot.com/-16fApX0rWmw/UBO8cvq9qpI/AAAAAAAABX0/UTZiUUYnjIU/s640/the+Hitler+Youth+for+Distinguished+Foreigners+-+obverse+-+fake+board.jpg)


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


[ _≪_ Previous: How to communicate Gazebo in Ubuntu with ROS Melodic and Unity
3d in Windows ](//gazebo214.rssing.com/chan-57893035/latest.php#c57893035a6938
"Previous Article")


#  [ How to get information between entities in contact with disabled physical
collisions? ](//gazebo214.rssing.com/chan-57893035/latest-article25-live.php)


    01238       bool is_paused = gazebo::Simulator::Instance()->IsPaused();
    01239       gazebo::Simulator::Instance()->SetPaused(true);
    01240
    01241       // supported updates
    01242       gazebo::World::Instance()->GetPhysicsEngine()->SetStepTime(req.[time_step](../../gazebo_msgs/html/structgazebo__msgs_1_1SetPhysicsPropertiesRequest__.html#a13e175b8b11ee2448d3743ea71440e95));
    01243       gazebo::World::Instance()->GetPhysicsEngine()->SetUpdateRate(req.[max_update_rate](../../gazebo_msgs/html/structgazebo__msgs_1_1SetPhysicsPropertiesRequest__.html#a502c042b7bfce132246f993e96613cf9));
    01244       gazebo::World::Instance()->GetPhysicsEngine()->SetGravity(gazebo::Vector3(req.[gravity](../../gazebo_msgs/html/structgazebo__msgs_1_1SetPhysicsPropertiesRequest__.html#a07807ebbfdcf1fb9a64e911e462ddf73).[x](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Vector3__.html#abf9dabaf651196aee50fd14bf3b643be),req.[gravity](../../gazebo_msgs/html/structgazebo__msgs_1_1SetPhysicsPropertiesRequest__.html#a07807ebbfdcf1fb9a64e911e462ddf73).[y](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Vector3__.html#aaea58ad929c43960a06f728d97132404),req.[gravity](../../gazebo_msgs/html/structgazebo__msgs_1_1SetPhysicsPropertiesRequest__.html#a07807ebbfdcf1fb9a64e911e462ddf73).[z](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Vector3__.html#a4cde719326e6c3688ab50b51ab4708b1)));
    01245
    01246       // stuff only works in ODE right now
    01247       gazebo::World::Instance()->GetPhysicsEngine()->SetAutoDisableFlag(req.[ode_config](../../gazebo_msgs/html/structgazebo__msgs_1_1SetPhysicsPropertiesRequest__.html#a29c501299aef72209f3b2c8cfee96ac6).[auto_disable_bodies](../../gazebo_msgs/html/structgazebo__msgs_1_1ODEPhysics__.html#af4555ca9c1ede8b07fc50cd2a2008f65));
    01248       gazebo::World::Instance()->GetPhysicsEngine()->SetSORPGSPreconIters(req.[ode_config](../../gazebo_msgs/html/structgazebo__msgs_1_1SetPhysicsPropertiesRequest__.html#a29c501299aef72209f3b2c8cfee96ac6).[sor_pgs_precon_iters](../../gazebo_msgs/html/structgazebo__msgs_1_1ODEPhysics__.html#a3c1b3fedf2a622faaec46676570eb3bc));
    01249       gazebo::World::Instance()->GetPhysicsEngine()->SetSORPGSIters(req.[ode_config](../../gazebo_msgs/html/structgazebo__msgs_1_1SetPhysicsPropertiesRequest__.html#a29c501299aef72209f3b2c8cfee96ac6).[sor_pgs_iters](../../gazebo_msgs/html/structgazebo__msgs_1_1ODEPhysics__.html#a0426be3e2cd9c192b511f0f6c2fe8f52));
    01250       gazebo::World::Instance()->GetPhysicsEngine()->SetRMSErrorTolerance(req.[ode_config](../../gazebo_msgs/html/structgazebo__msgs_1_1SetPhysicsPropertiesRequest__.html#a29c501299aef72209f3b2c8cfee96ac6).[sor_pgs_rms_error_tol](../../gazebo_msgs/html/structgazebo__msgs_1_1ODEPhysics__.html#afc440eb7f5da3792d00114fb3edf1edc));
    01251       gazebo::World::Instance()->GetPhysicsEngine()->SetSORPGSW(req.[ode_config](../../gazebo_msgs/html/structgazebo__msgs_1_1SetPhysicsPropertiesRequest__.html#a29c501299aef72209f3b2c8cfee96ac6).[sor_pgs_w](../../gazebo_msgs/html/structgazebo__msgs_1_1ODEPhysics__.html#a217a5bc35754775e2e27be8fce736fed));
    01252       gazebo::World::Instance()->GetPhysicsEngine()->SetContactSurfaceLayer(req.[ode_config](../../gazebo_msgs/html/structgazebo__msgs_1_1SetPhysicsPropertiesRequest__.html#a29c501299aef72209f3b2c8cfee96ac6).[contact_surface_layer](../../gazebo_msgs/html/structgazebo__msgs_1_1ODEPhysics__.html#a37d70bee50b3f628b6b7271c9792d6b5));
    01253       gazebo::World::Instance()->GetPhysicsEngine()->SetContactMaxCorrectingVel(req.[ode_config](../../gazebo_msgs/html/structgazebo__msgs_1_1SetPhysicsPropertiesRequest__.html#a29c501299aef72209f3b2c8cfee96ac6).[contact_max_correcting_vel](../../gazebo_msgs/html/structgazebo__msgs_1_1ODEPhysics__.html#af0c9a9a7e12ab8d902fb1930497b156d));
    01254       gazebo::World::Instance()->GetPhysicsEngine()->SetWorldCFM(req.[ode_config](../../gazebo_msgs/html/structgazebo__msgs_1_1SetPhysicsPropertiesRequest__.html#a29c501299aef72209f3b2c8cfee96ac6).[cfm](../../gazebo_msgs/html/structgazebo__msgs_1_1ODEPhysics__.html#abd023dd5214874a3dc73ff35db1676e3));
    01255       gazebo::World::Instance()->GetPhysicsEngine()->SetWorldERP(req.[ode_config](../../gazebo_msgs/html/structgazebo__msgs_1_1SetPhysicsPropertiesRequest__.html#a29c501299aef72209f3b2c8cfee96ac6).[erp](../../gazebo_msgs/html/structgazebo__msgs_1_1ODEPhysics__.html#a229fd2dd48856e64045104fab4caf707));
    01256       gazebo::World::Instance()->GetPhysicsEngine()->SetMaxContacts(req.[ode_config](../../gazebo_msgs/html/structgazebo__msgs_1_1SetPhysicsPropertiesRequest__.html#a29c501299aef72209f3b2c8cfee96ac6).[max_contacts](../../gazebo_msgs/html/structgazebo__msgs_1_1ODEPhysics__.html#a6e9643a7c7db7222eb0eb8d54d29473e));
    01257
    01258
    01259       gazebo::Simulator::Instance()->SetPaused(is_paused);
    01260       [ROS_INFO](../../../api/rosconsole/html/macros__generated_8h.html#a20d5da22f16df09d52a7577227636a83)("physics dynamics configure update complete");
    01261
    01262       res.[success](../../gazebo_msgs/html/structgazebo__msgs_1_1SetPhysicsPropertiesResponse__.html#aa9548c3d825aceb97bbed6a9a451a004) = true;
    01263       res.[status_message](../../gazebo_msgs/html/structgazebo__msgs_1_1SetPhysicsPropertiesResponse__.html#a105615d4a53b28ba56258cbcebda895e) = "physics engine updated";
    01264       return true;
    01265     }
    01266
    [01269](classGazeboROSNode.html#a09bff824f10a47e8b958ac3a38967a78)     bool [getPhysicsProperties](classGazeboROSNode.html#a09bff824f10a47e8b958ac3a38967a78)([gazebo_msgs::GetPhysicsProperties::Request](../../gazebo_msgs/html/structgazebo__msgs_1_1GetPhysicsPropertiesRequest__.html) &req,[gazebo_msgs::GetPhysicsProperties::Response](../../gazebo_msgs/html/structgazebo__msgs_1_1GetPhysicsPropertiesResponse__.html) &res)
    01270     {
    01271       // supported updates
    01272       res.[time_step](../../gazebo_msgs/html/structgazebo__msgs_1_1GetPhysicsPropertiesResponse__.html#a552908b569e8498573932c05382fabe3) = gazebo::World::Instance()->GetPhysicsEngine()->GetStepTime().Double();
    01273       res.[pause](../../gazebo_msgs/html/structgazebo__msgs_1_1GetPhysicsPropertiesResponse__.html#a6dc26a454de81aea66492e16805633e8) = gazebo::Simulator::Instance()->IsPaused();
    01274       res.[max_update_rate](../../gazebo_msgs/html/structgazebo__msgs_1_1GetPhysicsPropertiesResponse__.html#ae13cd5c58995e3bb29c9a1bb1841eb3d) = gazebo::World::Instance()->GetPhysicsEngine()->GetUpdateRate();
    01275       gazebo::Vector3 gravity = gazebo::World::Instance()->GetPhysicsEngine()->GetGravity();
    01276       res.[gravity](../../gazebo_msgs/html/structgazebo__msgs_1_1GetPhysicsPropertiesResponse__.html#aaf2c7b190ae32f439067ec22628aa004).[x](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Vector3__.html#abf9dabaf651196aee50fd14bf3b643be) = gravity.x;
    01277       res.[gravity](../../gazebo_msgs/html/structgazebo__msgs_1_1GetPhysicsPropertiesResponse__.html#aaf2c7b190ae32f439067ec22628aa004).[y](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Vector3__.html#aaea58ad929c43960a06f728d97132404) = gravity.y;
    01278       res.[gravity](../../gazebo_msgs/html/structgazebo__msgs_1_1GetPhysicsPropertiesResponse__.html#aaf2c7b190ae32f439067ec22628aa004).[z](../../../api/geometry_msgs/html/structgeometry__msgs_1_1Vector3__.html#a4cde719326e6c3688ab50b51ab4708b1) = gravity.z;
    01279


There are many ways to start Gazebo, open world models and spawn robot models
into the simulated environment. In this tutorial we cover the ROS-way of doing
things: using ` rosrun ` and ` roslaunch ` . This includes storing your URDF
files in ROS packages and keeping your various resource paths relative to your
ROS workspace.


I need to make a demo where I can see how the robot in Gazebo moves in the
same way the robot in Unity. I'm using in this case a turtlebot3 burger. For
the communication between ROS and Unity i'm using ROS-TCP-Connector and tcp
endpoint. I'm using: -Ubuntu 18.04.5 -Windows 10 -Ros melodic -Unity
2021.3.24f1 Thank you so much for your help!


gazebo


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


SampleSystem::Configure(const Entity &_entity, const std::shared_ptr  & _sdf,
EntityComponentManager &_ecm, EventManager &/*_eventMgr*/ ){ } void
SampleSystem::PostUpdate(const UpdateInfo &_info, const EntityComponentManager
&_ecm){ // ignmsg ) { ... } [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:
function onFoo(  ) { ... } [GUI] [Wrn] [Application.cc:797] [QT]
file::/Gazebo/GazeboDrawer.qml:147:3: QML Dialog: Binding loop detected for
property "implicitHeight" [GUI] [Wrn] [Application.cc:797] [QT]
file::/Gazebo/GazeboDrawer.qml:147:3: QML Dialog: Binding loop detected for
property "implicitHeight" [GUI] [Dbg] [Gui.cc:333] GUI requesting list of
world names. The server may be busy downloading resources. Please be patient.
[GUI] [Dbg] [PathManager.cc:55] Received resource paths. [GUI] [Dbg]
[Gui.cc:391] Requesting GUI from [/world/default/gui/info]... [GUI] [Dbg]
[GuiRunner.cc:145] Requesting initial state from [/world/default/state]...
[GUI] [Msg] Loading config [/home/sperospace/.ignition/gazebo/6/gui.config]
[GUI] [Dbg] [Application.cc:426] Loading plugin [MinimalScene] [GUI] [Msg]
Added plugin [3D View] to main window [GUI] [Msg] Loaded plugin [MinimalScene]
from path [/usr/lib/x86_64-linux-gnu/ign-gui-6/plugins/libMinimalScene.so]
[GUI] [Dbg] [Application.cc:426] Loading plugin [EntityContextMenuPlugin]
[GUI] [Wrn] [Application.cc:797] [QT]
file::/EntityContextMenuPlugin/EntityContextMenuPlugin.qml:57:5: QML
Connections: Implicitly defined onFoo properties in Connections are
deprecated. Use this syntax instead: function onFoo(  ) { ... } [GUI] [Wrn]
[Application.cc:797] [QT]
file::/EntityContextMenuPlugin/EntityContextMenuPlugin.qml:52:3: QML
RenderWindowOverlay: Detected anchors on an item that is managed by a layout.


July 31, 2023, 8:18 am