This commit is contained in:
ohwi
2019-07-13 01:52:51 +09:00
parent 9d1dc485db
commit 1f324aef87
@@ -10,7 +10,7 @@ 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
from gazebo_msgs.srv import GetLinkProperties, SetLinkProperties, GetLinkPropertiesResponse
from gazebo_msgs.srv import GetLinkPropertiesRequest, SetLinkPropertiesRequest
from geometry_msgs.msg import Pose
from open_manipulator_msgs.msg import KinematicsPose, OpenManipulatorState
@@ -22,6 +22,9 @@ from urdf_parser_py.urdf import URDF # noqa
import rospkg # noqa
SLOTS = ['com','gravity_mode','mass','ixx','ixy','ixz','iyy','iyz','izz']
class OpenManipulatorRosBaseInterface(object):
"""Open Manipulator Interface based on ROS."""
@@ -486,6 +489,8 @@ class OpenManipulatorRosGazeboInterface(OpenManipulatorRosBaseInterface):
for link in self.link_names:
request = SetLinkPropertiesRequest()
default = self.default_settings[link]
# set link_name
request.link_name = link
# copy values
for slot in request.__slots__:
value = getattr(default, slot)