Mesh file not loading in RVIZ and Gazebo
Hello ros developers. I'm new in ROS and I'm trying to create a robot using this .xacro file:
<?xml version='1.0'?>
<robot name="teste_bot" xmlns:xacro="http://www.ros.org/wiki/xacro">
<!-- Import Rviz colors -->
<xacro:include filename="$(find ntu_gazebo)/urdf/materials.xacro" />
<!-- Base Link -->
<link name="base_link">
<visual>
<origin xyz="0 0 0" rpy="0 0 0" />
<geometry>
<mesh filename="file:///home/gilmar/ros_ws/simulators/src/ntu_gazebo/meshes/chassis.stl" />
</geometry>
<material name="black"/>
</visual>
</link>
</robot>
and this launch file:
<?xml version="1.0" encoding="UTF-8" ?>
<launch>
<!-- Valores passados por linha de comando -->
<arg name="model" />
<arg name="gui" default="False" />
<!-- seta os parâmetros no Servidor de Parâmetros -->
<param name="robot_description" command="$(find xacro)/xacro '$(find ntu_gazebo)/urdf/$(arg model)'" /> <!--textfile="$(find ntu_gazebo)/urdf/$(arg model)"/>-->
<param name="use_gui" value="$(arg gui)"/>
<!-- Inicia 3 nós ros -->
<node name="joint_state_publisher_gui" pkg="joint_state_publisher_gui" type="joint_state_publisher_gui"/>
<node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher"/>
<node name="rviz" pkg="rviz" type="rviz" args="-d $(find ntu_gazebo)/urdf.rviz" required="true"/>
</launch>
but I'm having a problem loading the mesh. All the files are in the respective directory so that when I launch the node no error seems to occur, but the mesh simply doesn't show up. Does someone know what is happening?
gilmar@MARK-I:~/ros_ws/simulators$ roslaunch ntu_gazebo robot_rviz.launch model:=teste_bot.xacro
... logging to /home/gilmar/.ros/log/60c6946e-5380-11ec-9d65-00155d5e503d/roslaunch-MARK-I-12725.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
started roslaunch server http://MARK-I:42729/
SUMMARY
========
PARAMETERS
* /robot_description: <?xml version="1....
* /rosdistro: noetic
* /rosversion: 1.15.13
* /use_gui: False
NODES
/
joint_state_publisher_gui (joint_state_publisher_gui/joint_state_publisher_gui)
robot_state_publisher (robot_state_publisher/robot_state_publisher)
rviz (rviz/rviz)
auto-starting new master
process[master]: started with pid [12786]
ROS_MASTER_URI=http://localhost:11311
setting /run_id to 60c6946e-5380-11ec-9d65-00155d5e503d
process[rosout-1]: started with pid [12814]
started core service [/rosout]
process[joint_state_publisher_gui-2]: started with pid [12818]
process[robot_state_publisher-3]: started with pid [12823]
process[rviz-4]: started with pid [12824]
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-gilmar'
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-gilmar'
I'm using: - ros-noetic - ubuntu-20.04 - RViz r1.14.10 - Gazebo11