joints not responding to service call set_joint_properties

asked 2013-11-20 09:27:42 -0500

Garik gravatar image

I use the following function to manipulate my joints at realtime. This worked fine untill i tested it on my new robot (sdf code bellow). It seems that the joints are not visible to ros or something? the code works fine on every other model i try but I cant see any diffrance in the sdf files :(

void GazeboSDF::setJointProperties(const char * jointName, gazebo_msgs::ODEJointProperties jointConfig){
    ros::NodeHandle nodeHandle;
    ros::ServiceClient client = nodeHandle.serviceClient<gazebo_msgs::SetJointProperties>("/gazebo/set_joint_properties");
    gazebo_msgs::SetJointProperties service;
    service.request.joint_name = jointName;
    service.request.ode_joint_config = jointConfig;

    if (client.call(service)){
        ROS_INFO("sent joint properties success");
    }else{
        ROS_ERROR("Failed to call service set_joint_properties in setJointProperties()");
    }

}

SDF

<sdf version="1.4">

<model name="sixAxis">
<static>false</static>
<link name='base'> <!-- the base of the robot --> 
    <pose>0 0 0 0 0 0</pose>
    <gravity>false</gravity>

    <inertial>
        <mass>200</mass>
        <inertia ixx="2" ixy="0" ixz="0" iyy="3" iyz="0" izz="4"/>
    </inertial>
    <collision name='collision'>
        <pose>0 0 5 0 0 0</pose>
        <geometry>
            <box>
              <size> 10 10 10 </size>
            </box>
        </geometry>
    </collision>

    <visual name='visual'>

      <geometry>
        <mesh><uri>/home/huniversal/.gazebo/models/sixAxis/base.dae</uri></mesh>
      </geometry>

    </visual>
</link>

<!-- Motors --> 
<link name='motor1'> 
    <pose>-0.02924 2.9926 9.49426 0 0 0</pose>
    <gravity>true</gravity>

    <collision name='collision'>
      <geometry>
        <box>
          <size> 0.1 0.1 0.1</size>
        </box>
      </geometry>
    </collision>

    <visual name='visual'>

      <geometry>
        <mesh><uri>/home/huniversal/.gazebo/models/sixAxis/motorL.dae</uri></mesh>
      </geometry>
      <material>
        <ambient>0.3 0.1 0.2 1</ambient>
        <diffuse>0.3 0.1 0.2</diffuse>
        <specular>0.1 0.1 0.1 1</specular>
        <emissive>0 0 0 0</emissive>
      </material>
    </visual>
</link>

<link name='motor2'> 
    <pose>0.02924 2.9926 9.49426 0 0 0</pose>
    <gravity>true</gravity>

    <collision name='collision'>
      <geometry>
        <box>
          <size> 0.1 0.1 0.1</size>
        </box>
      </geometry>
    </collision>

    <visual name='visual'>

      <geometry>
        <mesh><uri>/home/huniversal/.gazebo/models/sixAxis/motorR.dae</uri></mesh>
      </geometry>
      <material>
        <ambient>0.3 0.1 0.2 1</ambient>
        <diffuse>0.3 0.1 0.2</diffuse>
        <specular>0.1 0.1 0.1 1</specular>
        <emissive>0 0 0 0</emissive>
      </material>
    </visual>
</link>

<link name='motor3'> 
    <pose>0.88071 1.51837 9.49426 0 0 1.047197551</pose>
    <gravity>true</gravity>

    <collision name='collision'>
      <geometry>
        <box>
          <size> 0.1 0.1 0.1</size>
        </box>
      </geometry>
    </collision>

    <visual name='visual'>

      <geometry>
        <mesh><uri>/home/huniversal/.gazebo/models/sixAxis/motorR.dae</uri></mesh>
      </geometry>
      <material>
        <ambient>0.3 0.1 0.2 1</ambient>
        <diffuse>0.3 0.1 0.2</diffuse>
        <specular>0.1 0.1 0.1 1</specular>
        <emissive>0 0 0 0</emissive>
      </material>
    </visual>
</link>

<link name='motor4'> 
    <pose>0.85135 1.46699 9.49426 0 0 1.047197551</pose>
    <gravity>true</gravity>

    <collision name='collision'>
      <geometry>
        <box>
          <size> 0.1 0.1 0.1</size>
        </box>
      </geometry>
    </collision>

    <visual name='visual'>

      <geometry>
        <mesh><uri>/home/huniversal/.gazebo/models/sixAxis/motorL.dae</uri></mesh ...
(more)
edit retag flag offensive close merge delete