Getting errors from robot_state_publisher
Update: I've include my urdf file. What would cause the joint states to come up emtpy?
Update: Where are these transforms coming from? I've had not seen link transforms before when I was using a single urdf file for both gazebo and rviz. Now that I split them I am getting these odd transforms with NaN data.
Original: I get the following errors from the robot state publisher...where can I locate the source of this error in the file description and what am I looking for.
Getting the following errors. I have no user nodes running. I am running the jointstatepublisher and the robotstatepublisher
Error: TF_NAN_INPUT: Ignoring transform for child_frame_id "left_wheel" from authority "/robot_state_publisher" because of a nan value in the transform (-nan -nan -nan) (-nan -nan -nan -nan)
at line 239 in /tmp/buildd/ros-hydro-tf2-0.4.5-0precise-20130721-0200/src/buffer_core.cpp
Error: TF_NAN_INPUT: Ignoring transform for child_frame_id "right_wheel" from authority "/robot_state_publisher" because of a nan value in the transform (-nan -nan -nan) (-nan -nan -nan -nan)
at line 239 in /tmp/buildd/ros-hydro-tf2-0.4.5-0precise-20130721-0200/src/buffer_core.cpp
**strong text**
From: rostopic echo tf
header:
seq: 0
stamp:
secs: 400
nsecs: 318000000
frame_id: base_link
child_frame_id: left_wheel
transform:
translation:
x: nan
y: nan
z: nan
rotation:
x: nan
y: nan
z: nan
w: nan
rostopic echo /joint_states
header:
seq: 250
stamp:
secs: 618
nsecs: 99000000
frame_id: ''
name: ['joint1', 'joint2', 'camera_joint']
position: [0.0, 0.0, 0.0]
velocity: []
rostopic echo /rrbot/joint1_position_controller/state
header:
seq: 65065
stamp:
secs: 664
nsecs: 619000000
frame_id: ''
set_point: -0.928255624474
process_value: -0.963152050837
process_value_dot: 0.0224822071073
error: 0.0348964263635
time_step: 0.001
command: 1.24142192562e-06
p: 0.0001
i: 0.0001
d: 0.0001
i_clamp: 0.0
===========URDF file =============
<?xml version="1.0"?>
<!-- Revolute-Revolute Manipulator -->
<robot name="rrbot" xmlns:xacro="http://www.ros.org/wiki/xacro">
<!-- Import all Gazebo-customization elements, including Gazebo colors -->
<xacro:include filename="$(find rrbot_description)/urdf/rrbot.gazebo" />
<!-- Import Rviz colors -->
<xacro:include filename="$(find rrbot_description)/urdf/materials.xacro" />
<xacro:property name="PI" value="3.1415926535897931"/> <!-- ${PI} -->
<link name='base_link'>
<collision name='collision'>
<origin xyz="0 0 .1" rpy="0 0 0"/>
<geometry>
<box size=".4 .2 .1"/>
</geometry>
</collision>
<visual name='visual'>
<origin xyz="0 0 .1 " rpy="0 0 0"/>
<geometry>
<box size=".4 .2 .1"/>
</geometry>
</visual>
<collision name='caster_collision'>
<origin xyz="-0.15 0 0.05" rpy="0 0 0"/>
<geometry>
<sphere radius=".05"/>
</geometry>
<surface>
<friction>
<ode>
<mu>0</mu>
<mu2>0</mu2>
<slip1>1.0</slip1>
<slip2>1.0</slip2>
</ode>
</friction>
</surface>
</collision>
<visual name='caster_visual'>
<origin xyz="-0.15 0 0.05" rpy="0 0 0"/>
<geometry>
<sphere radius=".05"/>
</geometry>
</visual>
<inertial>
<mass value="10" />
<origin xyz="0 0 .1 " rpy="0 0 0"/>
<inertia ixx="1" ixy="0" ixz="0"
iyy="1" iyz="0"
izz="1" />
</inertial>
</link>
<link name="left_wheel">
<collision name="collision">
<origin xyz="0.05 0.08 0.05" rpy="0 1.5707 1.5707"/>
<geometry>
<cylinder length="0.05" radius="0.1"/>
</geometry>
</collision>
<visual name="visual">
<origin xyz="0.05 0.08 0.05" rpy="0 1.5707 1.5707"/>
<geometry>
<cylinder length="0.05" radius="0.1"/>
</geometry>
</visual>
<inertial>
<mass value="1" />
<origin xyz="0.05 0.08 0.05"/>
<inertia ixx="1" ixy="0" ixz="0"
iyy="1" iyz="0"
izz="1" />
</inertial>
</link>
<link name="right_wheel">
<collision name="collision">
<origin xyz="0.05 -0.08 0.05" rpy="0 1.5707 1.5707"/>
<geometry>
<cylinder length="0.05" radius="0.1"/>
</geometry>
</collision>
<visual name="visual">
<origin xyz="0.05 -0.08 0.05" rpy="0 1.5707 1.5707"/>
<geometry>
<cylinder length="0.05" radius="0.1"/>
</geometry>
</visual>
<inertial>
<mass value="1" />
<origin xyz="0.05 -0.08 0.05"/>
<inertia ixx="1" ixy="0" ixz="0"
iyy="1" iyz="0"
izz="1" />
</inertial>
</link>
<joint type="continuous" name="joint1">
<origin xyz="0.05 0.08 0.05" rpy="1.5707 1.5707 0"/>
<child link="left_wheel">left_wheel</child>
<parent link="base_link">base_link</parent>
<axis>
<xyz>0 1 0</xyz>
</axis>
<limit effort="30" velocity="1.0"/>
</joint>
<joint type="continuous" name="joint2">
<origin xyz="0.05 -0.08 0.05" rpy="1.5707 1.5707 0"/>
<child link="right_wheel">right_wheel</child>
<parent link="base_link">base_link</parent>
<axis>
<xyz>0 1 0</xyz>
</axis>
<limit effort="30" velocity="1.0"/>
</joint>
<link name="camera_link">
<collision name="collision">
<origin xyz="0.1 0.0 0.1" rpy="0 0 0"/>
<geometry>
<cylinder length="0.1" radius="0.025"/>
</geometry>
</collision>
<visual name="visual">
<origin xyz="0.1 0.0 0.1" rpy="0 0 0"/>
<geometry>
<cylinder length="0.1" radius="0.025"/>
</geometry>
</visual>
<inertial>
<mass value="1" />
<origin xyz="0.1 0.0 0.1"/>
<inertia ixx="1" ixy="0" ixz="0"
iyy="1" iyz="0"
izz="1" />
</inertial>
</link>
<joint name="camera_joint" type="fixed">
<origin xyz="0 0.0 0.1" rpy="0 0 0" />
<axis xyz="0 0 1"/>>
<parent link="base_link" />
<child link="camera_link" />
</joint>
<link name="hokuyo_link">
<collision name="collision">
<origin xyz="0.1 0.0 0.05" rpy="0 0 0"/>
<geometry>
<cylinder length="0.1" radius="0.025"/>
</geometry>
</collision>
<visual name="visual">
<origin xyz="0.1 0.0 0.05" rpy="0 0 0"/>
<geometry>
<cylinder length="0.1" radius="0.025"/>
</geometry>
</visual>
<inertial>
<mass value="1" />
<origin xyz="0.1 0 0.05"/>
<inertia ixx="1" ixy="0" ixz="0"
iyy="1" iyz="0"
izz="1" />
</inertial>
</link>
<joint name="laser_joint" type="fixed">
<origin xyz="0 0 0.15" rpy="0 0 0" />
<axis xyz="0 0 1"/>>
<parent link="camera_link" />
<child link="hokuyo_link" />
</joint>
<transmission name="tran1">
<type>transmission_interface/SimpleTransmission</type>
<joint name="joint1"/>
<actuator name="motor1">
<hardwareInterface>EffortJointInterface</hardwareInterface>
<mechanicalReduction>1</mechanicalReduction>
</actuator>
</transmission>
<transmission name="tran2">
<type>transmission_interface/SimpleTransmission</type>
<joint name="joint2"/>
<actuator name="motor2">
<hardwareInterface>EffortJointInterface</hardwareInterface>
<mechanicalReduction>1</mechanicalReduction>
</actuator>
</transmission>
</robot>
======================= launch file ===================
<!-- Load robot description here ; used by rviz / rqt_gui -->
<param name="robot_description"
command="$(find xacro)/xacro.py '$(find rrbot_description)/urdf/rrbot.xacro'" />
<!-- Start rqt : note rrbot.rviz file must reside in launch dir -->
<node name="rqt_gui" pkg="rqt_gui" type="rqt_gui"/>
<!-- load the controllers -->
<!-- Load joint controller configurations from YAML file to parameter server -->
<rosparam file="$(find rrbot_control)/config/rrbot_control.yaml" command="load"/>
<node name="controller_spawner" pkg="controller_manager" type="spawner" respawn="true"
output="screen" ns="/rrbot" args="--namespace=/rrbot
joint1_position_controller
joint2_position_controller"/>
<!-- Take model joint stats from gazebo and publish as joint state messages -->
<node pkg="joint_state_publisher" type="joint_state_publisher"
name="joint_state_publisher" output="screen">
<param name="rate" value="3.0" />
</node>
<!-- Take joint state messages and pubish them as tf messages -->
<node pkg="robot_state_publisher" type="robot_state_publisher"
name="robot_state_publisher" output="screen">
<param name="publish_frequency" type="double" value="3.0" />
</node>
</launch>
========================Yaml file =================
rrbot:
# Publish all joint states -----------------------------------
joint_state_controller:
type: joint_state_controller/JointStateController
publish_rate: 30
# Position Controllers ---------------------------------------
joint1_position_controller:
type: effort_controllers/JointPositionController
joint: joint1
pid: {p: 0.0001, i: 0.0001, d: 0.01}
joint2_position_controller:
type: effort_controllers/JointPositionController
joint: joint2
pid: {p: 0.0001, i: 0.0001, d: 0.01}
Asked by rnunziata on 2013-08-20 04:44:57 UTC
Answers
Sorry...I was under the impression that this the joint state publisher took joint states from gazebo and published them to ros. It does not.
Asked by rnunziata on 2013-08-22 13:57:48 UTC
Comments