0
$\begingroup$

Rosanswers logo

I used the Planning Description Configuration Wizard and autogenerated the proper files. I then chose world as my base link and end_effector as the tip link. when I roslaunch al5b_arm_navigation.launch and rosrun the initialisation node at the bottom of this post for my joint_states topic, I get the output

[ WARN] [1338200653.324212205]: Got joint state update but did not update some joints for more than 1 second.  Turn on DEBUG for more info

This is the Urdf

<?xml version="1.0" ?>
<!-- =================================================================================== -->
<!-- |    This document was autogenerated by xacro from /home/oliver/ros_workspace/scanner_3d/robot/al5b.urdf.xacro | -->
<!-- |    EDITING THIS FILE BY HAND IS NOT RECOMMENDED                                 | -->
<!-- =================================================================================== -->
<robot name="al5b">
  <link name="world">
    <inertial>
      <mass value="0.05"/>
      <origin xyz="-0.0 0.0 -10.0"/>
      <inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/>
    </inertial>
    <collision>
      <origin rpy="0 0 0" xyz="0 0 0.15"/>
      <geometry>
        <box size="0.4 0.4 0.3"/>
      </geometry>
    </collision>
  </link>
  <joint name="base_joint" type="fixed">
    <parent link="world"/>
    <child link="shoulder_roll_link"/>
  </joint>
  <link name="shoulder_roll_link">
    <collision>
      <origin rpy="0 0 0" xyz="0 0 0.85"/>
      <geometry>
        <box size="3.8 3.8 1.9"/>
      </geometry>
    </collision>
  </link>
  <joint name="shoulder_roll_joint" type="revolute">
    <parent link="shoulder_roll_link"/>
    <child link="shoulder_flex_link"/>
    <origin rpy="0 0 0" xyz="0 0 1.725"/>
    <axis xyz="0 0 1"/>
    <limit effort="30" lower="-1.57" upper="1.57" velocity="1.0"/>
  </joint>
  <link name="shoulder_flex_link"/>
  <joint name="shoulder_lift_joint" type="revolute">
    <parent link="shoulder_flex_link"/>
    <child link="upperarm_link"/>
    <origin rpy="-1.57 -1.57 0" xyz="0 0 0.9"/>
    <axis xyz="0 0 1"/>
    <limit effort="30" lower="-1.57" upper="1.57" velocity="1.0"/>
  </joint>
  <link name="upperarm_link">
    <collision>
      <origin rpy="0 0 0" xyz="1.5 0 0"/>
      <geometry>
        <box size="3.00 0.9825 2.622"/>
      </geometry>
    </collision>
  </link>
  <joint name="elbow_flex_joint" type="revolute">
    <parent link="upperarm_link"/>
    <child link="forearm_link"/>
    <origin rpy="0 0 0" xyz="4.75 0 0"/>
    <axis xyz="0 0 1"/>
    <limit effort="30" lower="-1.57" upper="1.57" velocity="1.0"/>
  </joint>
  <link name="forearm_link">
    <collision>
      <origin rpy="0 0 0" xyz="1.66 0 0"/>
      <geometry>
        <box size="6.16 1.1 1.62"/>
      </geometry>
    </collision>
  </link>
  <joint name="wrist_flex_joint" type="revolute">
    <parent link="forearm_link"/>
    <child link="wrist_flex_link"/>
    <origin rpy="0 0 0" xyz="5.00 0 0"/>
    <axis xyz="0 0 1"/>
    <limit effort="30" lower="-1.57" upper="1.57" velocity="1.0"/>
  </joint>
  <link name="wrist_flex_link">
    <collision>
      <origin rpy="0 0 0" xyz="1.33 0 -0.805"/>
      <geometry>
        <box size="0.575 1.61 3.22"/>
      </geometry>
    </collision>
  </link>
  <joint name="wrist_roll_joint" type="revolute">
    <parent link="wrist_flex_link"/>
    <child link="end_effector"/>
    <origin rpy="1.57 0 1.57" xyz="1.64 0 0"/>
    <axis xyz="0 0 1"/>
    <limit effort="30" lower="-1.57" upper="1.57" velocity="1.0"/>
  </joint>
  <link name="end_effector">
    <collision>
      <origin rpy="0 0 0" xyz="0.52 0 1.14"/>
      <geometry>
        <box size="1.86 2.661 2.28"/>
      </geometry>
    </collision>
  </link>
</robot>

and the /joint_state publisher

#include <ros/ros.h>
#include <stdio.h>
#include <string>
#include <iostream>
#include <sensor_msgs/JointState.h>

int main(int argc, char **argv){
    ros::init(argc,argv,"state_publisher");
    ros::NodeHandle nh;
    ros::Publisher pub = nh.advertise<sensor_msgs::JointState>("joint_states",1000);
    ros::Rate lr(10);
        
    sensor_msgs::JointState msg;
    msg.name.push_back("wrist_roll_joint");
    msg.name.push_back("wrist_flex_joint");
    msg.name.push_back("elbow_flex_joint");
    msg.name.push_back("shoulder_lift_joint");
    msg.name.push_back("shoulder_roll_joint");
    msg.name.push_back("base_joint");
    
    for (int i = 0; i < 6; i++){
        msg.position.push_back(0.0);
        msg.velocity.push_back(0.0);
        msg.effort.push_back(0.0);
    }

    while(ros::ok()){
        msg.header.stamp = ros::Time::now();
        pub.publish(msg);
        ros::spinOnce();
    }
}

Any known solutions for this? Sorry to harrass with a large post of code Blockquote


Originally posted by ocli on ROS Answers with karma: 215 on 2012-05-28

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

That you advertise the joint topic at 1000 and then use a rate of 10 could give problems. Although you are not letting the loop sleep, so that has no influence. Try to advertise the topic also at 10, and turn on debug using rxconsole.


Originally posted by davinci with karma: 2573 on 2013-12-28

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.