Unable to render model in RViz [closed]

asked 2015-05-19 00:05:04 -0500

Cerin gravatar image

I'm attempting to follow this tutorial for controlling a robot in a Gazebo simulation. I can view my model in Rviz by itself just fine. I can view my model in Gazebo by itself just fine. But when I run the tutorial's command:

roslaunch mybot_gazebo mybot_gazebo.launch

to load both Rviz and Gazebo simultaneously along with a controller and state publisher, Gazebo renders the model, but doesn't seem to simulate physics even though the simulation is running and consuming 100% CPU, and RViz renders nothing at all in the 3d panel even though the left-hand panel shows no errors:

At the terminal, I see the warning:

Warning: Controller Spawner couldn't find the expected controller_manager ROS interface.

What's causing this?

My model in mybot_description/models/mybot.urdf.xacro:

<?xml version="1.0"?>
<robot name="mybot"
    xmlns:xacro="http://www.ros.org/wiki/xacro">

    <xacro:macro name="box_inertia" params="mass x y z">
        <inertia
            ixx="${mass*(y*y+z*z)/12}" ixy="0" ixz="0"
            iyy="${mass*(x*x+z*z)/12}" iyz="0" izz="${mass*(x*x+z*z)/12}" /> 
    </xacro:macro>

    <xacro:include filename="$(find mybot_description)/models/materials.urdf.xacro" />

    <!-- width in meters -->
    <property name="torso_x_size" value="0.1" />

    <!-- length in meters -->
    <property name="torso_y_size" value="0.205" />

    <!-- height in meters -->
    <property name="torso_z_size" value="0.03" />

    <!-- torso mass (not including legs) in kg -->
    <property name="torso_mass" value="0.920" />

    <!-- distance from ground to shoulders when standing at full height -->
    <property name="total_leg_height" value="0.158" />

    <!-- mass of a single upper leg piece in kg -->
    <property name="upper_leg_mass" value="0.010" />

    <property name="upper_leg_depth" value="0.003" />
    <property name="upper_leg_length" value="0.04" />
    <property name="upper_leg_thickness" value="0.005" />

    <link name="base_footprint">
        <visual>
            <origin xyz="0 0 0" rpy="0 0 0" />
            <geometry>
                <box size="0.001 0.001 0.001" />
            </geometry>
        </visual>
        <inertial>
            <mass value="0.0001" />
            <origin xyz="0 0 0" />
            <inertia
                ixx="0.0001" ixy="0.0" ixz="0.0"
                iyy="0.0001" iyz="0.0" izz="0.0001" />
        </inertial>
    </link>
    <gazebo reference="base_footprint">
        <turnGravityOff>false</turnGravityOff>
    </gazebo>

    <joint name="base_footprint_joint" type="fixed">
        <origin xyz="0 0 ${total_leg_height}" rpy="0 0 0" />
        <parent link="base_footprint"/>
        <child link="base_link" />
    </joint>

    <link name="base_link">
        <visual>
            <geometry>
                <box size="${torso_x_size} ${torso_y_size} ${torso_z_size}" />
            </geometry>
            <material name="red"/>
        </visual>
        <collision>
            <geometry>
                <box size="${torso_x_size} ${torso_y_size} ${torso_z_size}" />
            </geometry>
        </collision>
        <inertial>
            <origin xyz="0 0 0" rpy="0 0 0" />
            <mass value="${torso_mass}" />
            <xacro:box_inertia
                mass="${torso_mass}"
                x="${torso_x_size}" y="${torso_y_size}" z="${torso_z_size}" />
        </inertial>
    </link>
    <gazebo reference="base_link">
        <material>Gazebo/Red</material>
        <turnGravityOff>false</turnGravityOff>
    </gazebo>

    <xacro:macro name="leg" params="name reflect_x reflect_y">
        <link name="${name}">
            <visual>
                <geometry>
                    <box size="${upper_leg_depth} ${upper_leg_length} ${upper_leg_thickness}" />
                </geometry>
                <origin xyz="${upper_leg_depth/2*reflect_x} ${upper_leg_length/2} 0" rpy="0 0 0"/>
                <material name="blue" />
            </visual>
            <collision>
                <geometry>
                    <box size="${upper_leg_depth} ${upper_leg_length} ${upper_leg_thickness}" />
                </geometry>
                <origin xyz="${upper_leg_depth/2*reflect_x} ${upper_leg_length/2} 0" rpy="0 0 0"/>
            </collision>
            <inertial>
                <origin xyz="0 0 0" rpy="0 0 0" />
                <mass value="${upper_leg_mass}" />
                <xacro:box_inertia
                    mass="${upper_leg_mass ...
(more)
edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by tfoote
close date 2017-03-29 16:50:43.871941