mirror of
https://github.com/wassname/kair_algorithms_draft.git
synced 2026-09-09 11:25:10 +08:00
Joint -> Link
This commit is contained in:
@@ -10,8 +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 GetJointProperties, SetJointProperties
|
||||
from gazebo_msgs.srv import GetJointPropertiesRequest, SetJointPropertiesRequest
|
||||
from gazebo_msgs.srv import GetLinkProperties, SetLinkProperties
|
||||
from gazebo_msgs.srv import GetLinkPropertiesRequest, SetLinkPropertiesRequest
|
||||
from geometry_msgs.msg import Pose
|
||||
from open_manipulator_msgs.msg import KinematicsPose, OpenManipulatorState
|
||||
from pykdl_utils.kdl_kinematics import KDLKinematics
|
||||
@@ -381,11 +381,11 @@ class OpenManipulatorRosGazeboInterface(OpenManipulatorRosBaseInterface):
|
||||
def __init__(self, cfg):
|
||||
rospy.init_node("OpenManipulatorRosGazeboInterface")
|
||||
super(OpenManipulatorRosGazeboInterface, self).__init__(cfg)
|
||||
self.get_joint_properties = rospy.ServiceProxy('/gazebo/get_joint_properties', GetJointProperties)
|
||||
self.set_joint_properties = rospy.ServiceProxy('/gazebo/set_joint_properties', SetJointProperties)
|
||||
self.get_link_properties = rospy.ServiceProxy('/gazebo/get_link_properties', GetLinkProperties)
|
||||
self.set_link_properties = rospy.ServiceProxy('/gazebo/set_link_properties', SetLinkProperties)
|
||||
|
||||
print([j.name for j in self.robot.joints])
|
||||
print(self.get_joint_properties(GetJointPropertiesRequest('joint1')))
|
||||
print([j.name for j in self.robot.links])
|
||||
print(self.get_link_properties(GetLinkPropertiesRequest('joint1')))
|
||||
|
||||
def reset_gazebo_world(self, block_pose=None):
|
||||
"""Initialize randomly the state of robot agent and surrounding envs (including target obj.)."""
|
||||
|
||||
Reference in New Issue
Block a user