[robot_description] RobotModel status error in RVIZ

I am currently working on the project in URDF course. I have finished all the xacro files. The model is correctly spawned in Gazebo, however, it shows status:error in rviz. I’ve noticed that the robot description is wrong as it should be ‘robot_name/robot_description’ but I think I have declared that in the launch files. Also, the neck links from 1 to 4 are missing in rviz, resulting no transform for the final neck link and the head


box_boxer_spawn.launch

<launch>
	
	<arg name="model" default="$(find box_boxer_description)/robot/box_boxer.xacro"/>
    <arg name="boxer_name" default="little_mech"/>
	<arg name="boxer_id" default="1" />


	<group ns="$(arg boxer_name)">

		<param name="robot_description" command="$(find xacro)/xacro --inorder $(arg model) boxer_name:=$(arg boxer_name)"/> 

		<node name="urdf_spawner"
				pkg="gazebo_ros"
				type="spawn_model"
				respawn="false"
				output="screen"
				args= "-urdf -model $(arg boxer_name) -param robot_description">
        </node>

    </group>
  
</launch>

box_boxer_controller.launch

<launch>

    <arg name="boxer_name" default="little_mech"/>

    <group ns="$(arg boxer_name)">

        <rosparam file="$(find box_boxer_description)/config/box_boxer.yaml"
            command="load"/>

        <node name="controller_spawner" 
              pkg="controller_manager" 
              type="spawner" 
              respawn="false"
              output="screen" 
              args="joint_state_controller 
                    glove_R_joint_position_controller
                    glove_L_joint_position_controller
                    neck_1_joint_position_controller
                    neck_2_joint_position_controller
                    neck_3_joint_position_controller
                    neck_4_joint_position_controller
                    neck_5_joint_position_controller">
        </node>

        <node name = "robot_state_publisher"
              pkg = "robot_state_publisher"
              type = "robot_state_publisher"
              respawn = "false"
              output = "screen">
        </node>

    </group>

</launch>

main.launch

<?xml version="1.0" encoding="UTF-8"?>
<launch>

    <include file="$(find box_boxer_description)/launch/box_boxer_spawn.launch"/>
    <include file="$(find box_boxer_description)/launch/box_boxer_controller.launch"/>

</launch>```

Hi,

Begore adding any ocntroll nd looking into RVIZ, focus on having the model correctly appear inGazebo. That means having all the links of the neck appear correctly and the materials and all.

Start spawning the XACRO incrementally, so adding first the base, then the torso , then the arms. You can do this by removing those parts form the XACRO, spawing, checking aveerithing is ok an then continuing until you see there is an error and the fix that particular part.

Once you have that , then focus on why your links an dtfs don’t appear in RVIZ because it might solve it self.

Please post here your progress so we can have a look and guide you further

Hi @duckfrost2,

Thank you for your reply. As shown in the second photo, all the links are successfully spawned in Gazebo. Do you have any ideas or step how to debug for xacro not showing correctly in RVIZ?

First of all the orbot in GAZEBO , should appear like that. So there is something wrong with the materials or gazebo or something similar. So I would check that also.

I highly recommend that you start by spawning the simplest art, the base.
See that it appears both in RVIZ and Gazebo. This allow you to fix basic issues related to the spawning, robot namespaces and so on.

Once that works, then start adding piece by piece. Thats the best way to incrementally have it working or at least detect errors faster an pinpoint whee they are.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.