Bug with colors loading from xacro in Gazebo 7 [closed]
In my model.xacro file there is:
<gazebo reference="top_plate">
<material> Gazebo/Black </material>
</gazebo>
And I only get an white model. If I Edit the model in Gazebo7 and write 'Gazebo/Black' in Visusal/Material/Scrip/Name it works. I want it to be black while loarding. Has someboady an idea how to fix this bug.
My launch file:
<launch>
<include file="$(find gazebo_ros)/launch/empty_world.launch">
<!-- Note: the world_name is with respect to GAZEBO_RESOURCE_PATH environmental variable -->
<arg name="world_name" value="worlds/empty.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"/>
<extra_gazebo_args value="verbose" />
</include>
<include file="$(find project_gazebo)/urdf/pioneer3at_kinect.xml" />
<node name="spawn_p3dx" pkg="gazebo_ros" type="spawn_model" args="-urdf -param robot_description -model robot_description -x -0.0 -y -0.0 -z 0.051" respawn="false" output="screen" />
</launch>
My model file:
<?xml version="1.0"?>
<robot xmlns:sensor="http://playerstage.sourceforge.net/gazebo/xmlschema/#sensor"
xmlns:controller="http://playerstage.sourceforge.net/gazebo/xmlschema/#controller"
xmlns:interface="http://playerstage.sourceforge.net/gazebo/xmlschema/#interface"
xmlns:xacro="http://ros.org/wiki/xacro"
>
<!-- Chassis -->
<link name="base_link">
<inertial>
<mass value="15.0"/>
<origin xyz="0 0 0.10"/>
<inertia ixx="0.3338" ixy="0.0" ixz="0.0"
iyy="0.4783" iyz="0.0"
izz="0.3338"/>
</inertial>
<visual name="base_visual">
<origin xyz="0 0 0.177" rpy="0 0 0"/>
<geometry name="pioneer_geom">
<mesh filename="package://project_gazebo/meshes/p3at_meshes/chassis.stl"/>
</geometry>
<material name="ChassisRed">
<color rgba="0.851 0.0 0.0 1.0"/>
</material>
</visual>
<collision>
<origin xyz="0 0 0.177" rpy="0 0 0"/>
<geometry>
<mesh filename="package://project_gazebo/meshes/p3at_meshes/chassis.stl"/>
</geometry>
</collision>
</link>
<gazebo reference="base_link">
<visual>
<material>
<script>
<name value="Gazebo/Red"/>
</script>
</material>
</visual>
</gazebo>
</robot>
And the Gazbeo look like:
it works in my gazebo 7.0.0. Are you sure you wrote the link name correctly?
What's the output look like with the --verbose argument given to gazebo? If you're launching gazebo with roslaunch the arg atribute can be used to provide it http://wiki.ros.org/roslaunch/XML/node
the link name is corrct. It worked in ros-indigo and gazebo 2 @sloretz what exactly you mean can I just add "<extra_gazebo_args value="verbose"/>" to the launch file? I posted my launch file above
empty_world.launch in gazebo_ros allows enabling verbose with either <arg name="extra_gazebo_args" value="--verbose"/> or <arg name="verbose" value="true"/>
It won't help him much,though