Skip to content
Snippets Groups Projects
Commit eeee79f6 authored by Gabriele Buondonno's avatar Gabriele Buondonno
Browse files

[gazebo_utils] Add is_gazebo_present

parent a8993045
No related branches found
No related tags found
No related merge requests found
......@@ -8,6 +8,13 @@ from geometry_msgs.msg import Wrench
from dynamic_graph_bridge_msgs.msg import Vector as VectorMsg
from tf.transformations import euler_from_quaternion
def is_gazebo_present():
list_of_topics =rospy.get_published_topics()
for a_topic in list_of_topics:
if a_topic[0].startswith('/gazebo'):
return True
return False
def apply_force(force,duration, body_name = "talos::torso_2_link"):
'''Gazebo service call for applying a force on a body.'''
rospy.wait_for_service('/gazebo/apply_body_wrench')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment