ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
In your first file, you do not have any colour added to your link_1
in flexweld.gazebo
you have added a gazebo reference. Rviz does not use gazebo references to get the colour, so rviz doesn't know a colour exists. this can be fixed by changing link_1
to this:
<link name="link_1">
<visual>
<geometry>
<cylinder length="0.1" radius="1"/>
</geometry>
<material name="orange"/>
</visual>
Assuming of course in materials.xacro
you have added this:
<material name="orange">
<color rgba="0.8 0.4 0.0 1.0"/>
</material>
That should resolve your rviz issue. Your gazebo issue seems to be related to the reason that you have not included flexweld.gazebo
anywhere in your files, as far as I can see. Have you included it using:
<xacro:include filename="$(find robot)/urdf/flexweld.gazebo" />
as you have done your other files?
2 | No.2 Revision |
In your first file, you do not have any colour added to your link_1
in flexweld.gazebo
you have added a gazebo reference. Rviz does not use gazebo references to get the colour, so rviz doesn't know a colour exists. this can be fixed by changing link_1
to this:
<link name="link_1">
<visual>
<geometry>
<cylinder length="0.1" radius="1"/>
</geometry>
<material name="orange"/>
</visual>
Assuming of course in materials.xacro
you have added this:
<material name="orange">
<color rgba="0.8 0.4 0.0 1.0"/>
</material>
That should resolve your rviz issue. Your gazebo issue seems to be related to the reason that you have not included flexweld.gazebo
anywhere in your files, as far as I can see. Have you included it using:
<xacro:include filename="$(find robot)/urdf/flexweld.gazebo" />
as you have done your other files?
EDIT based on comment:
Okay, flexweld.gazebo
is actually called my_robot.gazebo
in that case you have included it. I took a quick look to how exactly I implemented the colour in my URDF file and I noticed I've implemented it like this:
<gazebo reference="base_link">
<material>Gazebo/Orange</material>
</gazebo>
without the <material>
tags in the reference. Just out of curiosity, is that the issue? Is it fixed if you remove the tag from just the <gazebo reference>
portion, like I've done here?
3 | No.3 Revision |
In your first file, you do not have any colour added to your link_1
in flexweld.gazebo
you have added a gazebo reference. Rviz does not use gazebo references to get the colour, so rviz doesn't know a colour exists. this can be fixed by changing link_1
to this:
<link name="link_1">
<visual>
<geometry>
<cylinder length="0.1" radius="1"/>
</geometry>
<material name="orange"/>
</visual>
Assuming of course in materials.xacro
you have added this:
<material name="orange">
<color rgba="0.8 0.4 0.0 1.0"/>
</material>
That should resolve your rviz issue. Your gazebo issue seems to be related to the reason that you have not included flexweld.gazebo
anywhere in your files, as far as I can see. Have you included it using:
<xacro:include filename="$(find robot)/urdf/flexweld.gazebo" />
as you have done your other files?
EDIT based on comment:
Okay, flexweld.gazebo
is actually called my_robot.gazebo
in that case you have included it. I took a quick look to how exactly I implemented the colour in my URDF file and I noticed I've implemented it like this:
<gazebo reference="base_link">
<material>Gazebo/Orange</material>
</gazebo>
without the
tags in the reference. Just out of curiosity, is that the issue? Is it fixed if you remove the tag from just the <material><visual><gazebo reference>
portion, like I've done here?