Ask Your Question

No transform from A to B (but only when using Gazebo)

asked 2020-05-03 13:38:37 -0600

iyantiram gravatar image

Hello All,

I am new to ROS and have been searching the forums for an answer to a problem I am having. This is the problem:

image description

Similar posts seem to indicate that one needs to add a joint_state_publisher, which, to my understanding, I have done as shown in launch file below.

However, when I remove the Gazebo parts from the launch file (see ADDING THIS CREATED THE NO TRANSFORM ERROR in launch file below) the error disappears as shown below:

image description

My launch file is as follow:

<arg name="limited" default="false" doc="If true, limits joint range [-PI, PI] on all joints." />
<arg name="paused" default="true" doc="Starts gazebo in paused mode" />
<arg name="gui" default="true" doc="Starts gazebo gui" />

<!-- <arg name="world_name" default="$(find ps)/worlds/"/>
<include file="$(find gazebo_ros)/launch/empty_world.launch">
    <arg name="world_name" default="worlds/"/>
    <arg name="paused" value="$(arg paused)"/>
    <arg name="gui" value="$(arg gui)"/>
</include> -->

<!-- send robot urdf to param server -->
<include file="$(find ur_description)/launch/ur5_upload.launch">
    <arg name="limited" value="$(arg limited)"/>

<!-- UR5 and the Intel Realsense -->
<param name="robot_description" command="$(find xacro)/xacro  --inorder '$(find ps)/urdf/ur5realsense.xacro'" />

<!-- push camera to gazebo -->
<!-- <node name="spawn_camera" pkg="gazebo_ros" type="spawn_model" args="-urdf -param robot_description -model robot -z 0.1" respawn="false" output="screen" /> -->

<!-- Robot state publisher -->
<!-- <node pkg="robot_state_publisher" type="robot_state_publisher" name="robot_state_publisher">
    <param name="publish_frequency" type="double" value="50.0" />
    <param name="tf_prefix" type="string" value="" />
</node> -->

<node name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher" />

<!-- Fake Calibration -->
<node pkg="rostopic" type="rostopic" name="fake_joint_calibration" args="pub /calibrated std_msgs/Bool true" />

<!-- joint_state_controller -->
<rosparam file="$(find ur_gazebo)/controller/joint_state_controller.yaml" command="load"/>
<node name="joint_state_controller_spawner" pkg="controller_manager" type="controller_manager" args="spawn joint_state_controller" respawn="false" output="screen"/>

<!-- bring up joint controller gui -->
<node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher">
    <param name="use_gui" value="true"/>

<node name="rviz" pkg="rviz" type="rviz" args="-d $(find ur_description)/cfg/view_robot.rviz" />

Here are the links in the xacro:

xacro ur5realsense.xacro > a.urdf 
check_urdf a.urdf 
robot name is: robot_description
---------- Successfully Parsed XML ---------------
root Link: world has 1 child(ren)
    child(1):  base_link
        child(1):  base
        child(2):  shoulder_link
            child(1):  upper_arm_link
                child(1):  forearm_link
                    child(1):  wrist_1_link
                        child(1):  wrist_2_link
                            child(1):  wrist_3_link
                                child(1):  ee_link
                                child(2):  tool0
                                    child(1):  camera_bottom_screw_frame
                                        child(1):  camera_link
                                            child(1):  camera_color_frame
                                                child(1):  camera_color_optical_frame
                                            child(2):  camera_depth_frame
                                                child(1):  camera_depth_optical_frame
                                            child(3):  camera_infra1_frame
                                                child(1):  camera_infra1_optical_frame
                                            child(4):  camera_infra2_frame
                                                child(1):  camera_infra2_optical_frame

Can anyone point out what is going wrong when adding gazebo to the launch file?

Thank you,


edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2020-05-04 15:10:01 -0600

iyantiram gravatar image

Hello All,

I was able to fix this issue. The problem was starting gazebo in the paused state which I overlooked.

Once Gazebo is unpaused, the tf errors (No transform from A to B) vanish.


edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2020-05-03 13:38:12 -0600

Seen: 156 times

Last updated: May 04 '20