This commit is contained in:
ohwi
2019-07-13 01:28:18 +09:00
parent 780a31f069
commit b80dc45e69
@@ -10,7 +10,8 @@ import rospy # noqa
import tf # noqa
import tf.transformations as tr # noqa
from gazebo_msgs.srv import DeleteModel, GetModelState, SpawnModel # noqa
from gazebo_msgs.srv import GetLinkProperties, SetLinkProperties, SetJointPropertiesRequest
from gazebo_msgs.srv import GetJointProperties, SetJointProperties
from gazebo_msgs.srv import GetJointPropertiesRequest, SetJointPropertiesRequest
from geometry_msgs.msg import Pose
from open_manipulator_msgs.msg import KinematicsPose, OpenManipulatorState
from pykdl_utils.kdl_kinematics import KDLKinematics
@@ -380,10 +381,11 @@ class OpenManipulatorRosGazeboInterface(OpenManipulatorRosBaseInterface):
def __init__(self, cfg):
rospy.init_node("OpenManipulatorRosGazeboInterface")
super(OpenManipulatorRosGazeboInterface, self).__init__(cfg)
self.get_link_properties = rospy.ServiceProxy('/gazebo/get_link_properties', GetLinkProperties)
self.set_link_properties = rospy.ServiceProxy('/gazebo/set_link_properties', SetLinkProperties)
self.get_joint_properties = rospy.ServiceProxy('/gazebo/get_joint_properties', GetJointProperties)
self.set_joint_properties = rospy.ServiceProxy('/gazebo/set_joint_properties', SetJointProperties)
print(self.robot.joints)
print([j.name for j in self.robot.joints])
print(self.get_joint_properties(GetJointPropertiesRequest('joint1')))
def reset_gazebo_world(self, block_pose=None):
"""Initialize randomly the state of robot agent and surrounding envs (including target obj.)."""