How to remove the namespace of tf published by gazebo sensor plugin?
I spawn a robot called robuster, which has a ray sensor. The sensor's gazebo reference is "livox_base".However, in tf_tree, gazebo publish a "robuster::livox_base" tf so that the tree has two roots. How to remove the namespace "robuster?"
As the suggestion by skpro19, it's my launch file
<launch>
<arg name="model" default="waffle_pi" doc="model type [burger, waffle, waffle_pi]"/>
<arg name="x_pos" default="1"/>
<arg name="y_pos" default="-8"/>
<arg name="z_pos" default="0.0"/>
<arg name="roll" default="0"/>
<arg name="pitch" default="0"/>
<arg name="yaw" default="1.57"/>
<arg name="use_ekf_localization" default="false" />
<arg name="world" default="$(find active_mapping)/worlds/house.world" />
<arg name="robot_urdf" default="$(find active_mapping)/urdf/robuster_horizon.urdf.xacro" />
<remap to="cmd_vel" from="mr1000_velocity_controller/cmd_vel"/>
<!-- <remap to="odom" from="mr1000_velocity_controller/odom"/> -->
<include file="$(find gazebo_ros)/launch/empty_world.launch">
<arg name="world_name" value="$(arg world)"/>
<arg name="paused" value="false"/>
<arg name="use_sim_time" value="true"/>
<arg name="gui" value="true"/>
<arg name="headless" value="false"/>
<arg name="debug" value="false"/>
</include>
<param name="robot_description" command="$(find xacro)/xacro --inorder $(arg robot_urdf)" />
<node name="spawn_urdf" pkg="gazebo_ros" type="spawn_model" args="-urdf -model robuster -x $(arg x_pos) -y $(arg y_pos) -z $(arg z_pos) -Y $(arg yaw) -param robot_description" />
<node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher">
<param name="publish_frequency" type="double" value="30.0" />
</node>
<rosparam file="$(find active_mapping)/config/robuster_horizon/crank_gazebo_control.yaml" command="load"/>
<rosparam file="$(find active_mapping)/config/robuster_horizon/diff_drive_control.yaml" command="load"/>
<node name="car_controller_spawner" pkg="controller_manager" type="spawner" ns="/"
args="mr1000_velocity_controller crank_joint_position_controller mr1000_joint_publisher"/>
<group if="$(arg use_ekf_localization)">
<node pkg="robot_localization" type="ekf_localization_node" name="ekf_localization">
<rosparam command="load" file="$(find active_mapping)/config/robuster_horizon/localization.yaml" />
</node>
</group>
<group unless="$(arg use_ekf_localization)">
<node pkg="active_mapping" type="odom_to_tf" name="odom_to_tf">
</node>
</group>
</launch>
You might need to make some changes in the
urdf
file for the robot model.Can you please share your
launch
file wherein you are spawning the bot in theGazebo
world?Yes.
Could you also share
robuster_horizon.urdf.xacro
file ?Yes, this is my robuster_horizon file: https://gist.github.com/EpsAvlc/c21df...
<xacro:include filename="$(find livox_laser_simulation)/urdf/livox_horizon.xacro"/>
Could you also share
livox_horizon.xacro
?livox_horizon.xacro: https://gist.github.com/EpsAvlc/f0c24...