No transform from [] to [robot_1/odom] [closed]
Hello all,
I'm trying to run a simulation of a multi robot system with Gazaebo and visualize it on RVIZ. Since I'm using Noetic, I was forced to declare every transform with static_transform_publisher but when I do so, I keep getting the same error over and over again on RVIZ: No transform from [] to [robot_1/odom]. This happens in every single element of the robot and I don't understand why.
My code is spread over 3 files:
- multi_robot_simulation.launch;
- robots.launch;
- one_robot.launch.
And they are executed in this exact order. Below I included the code for each launch file:
multi_robot_simulation.launch:
<launch>
<arg name="model" default="$(env TURTLEBOT3_MODEL)" doc="model type [burger, waffle, waffle_pi]"/>
<!-- Start Robot world -->
<include file="$(find gazebo_ros)/launch/empty_world.launch">
<arg name="world_name" value="$(find turtlebot3_gazebo)/worlds/turtlebot3_world.world"/>
<arg name="use_sim_time" value="true"/>
<arg name="gui" value="true"/>
<arg name="debug" value="false"/>
</include>
<!-- include our robots -->
<include file="$(find gspn_framework_package)/ros/launch/static_transform_publisher_test/robots.launch"/>
</launch>
robots.launch:
<launch>
<group ns="robot_1">
<include file="$(find gspn_framework_package)/ros/launch/static_transform_publisher_test/one_robot.launch" >
<arg name="init_pose" value="-x -0.5 -y 0.5 -z 0" />
<arg name="x" value="-0.5" />
<arg name="y" value="0.5" />
<arg name="robot_name" value="Robot1" />
<arg name="name_space" value="robot_1" />
</include>
</group>
<node name="rviz" pkg="rviz" type="rviz" args="-d $(find gspn_framework_package)/ros/config/myconfig.rviz"/>
</launch>
one_robot.launch:
<launch>
<arg name="robot_name"/>
<arg name="init_pose"/>
<arg name="name_space"/>
<arg name="x"/>
<arg name="y"/>
<param name="robot_description" command="$(find xacro)/xacro $(find turtlebot3_description)/urdf/turtlebot3_waffle_pi.urdf.xacro" />
<node name="spawn_urdf" pkg="gazebo_ros" type="spawn_model" args="$(arg init_pose) -urdf -param robot_description -model $(arg robot_name)"/>
<!-- The transforms. -->
<node pkg='tf2_ros' type='static_transform_publisher' name='odom_transform'
args='$(arg x) $(arg y) 0 0 0 0 map $(arg name_space)/odom'/>
<node pkg='tf2_ros' type='static_transform_publisher' name='base_footprint_transform'
args='$(arg x) $(arg y) 0 0 0 0 $(arg name_space)/odom $(arg name_space)/base_footprint'/>
<node pkg='tf2_ros' type='static_transform_publisher' name='static_transform_publisher'
args='0 0 0.010 0 0 0 $(arg name_space)/base_footprint $(arg name_space)/base_link'/>
<node pkg='tf2_ros' type='static_transform_publisher' name='wheel_left_joint'
args='0.0 0.144 0.023 -1.57 0 0 $(arg name_space)/base_link $(arg name_space)/wheel_left_link'/>
<node pkg='tf2_ros' type='static_transform_publisher' name='wheel_right_joint'
args='0.0 -0.144 0.023 -1.57 0 0 $(arg name_space)/base_link $(arg name_space)/wheel_right_link'/>
<node pkg='tf2_ros' type='static_transform_publisher' name='caster_back_right_joint'
args='-0.177 -0.064 -0.004 -1.57 0 0 $(arg name_space)/base_link $(arg name_space)/caster_back_right_link'/>
<node pkg='tf2_ros' type='static_transform_publisher' name='caster_back_left_joint'
args='-0.177 0.064 -0.004 -1.57 0 0 $(arg name_space)/base_link $(arg name_space)/caster_back_left_link'/>
<node pkg='tf2_ros' type='static_transform_publisher' name='imu_joint'
args='0.0 0 0.068 0 0 0 $(arg name_space)/base_link ...