0
$\begingroup$

Rosanswers logo

I just started learning ROS2 by porting the osrf prius simulation to ROS2 and here i ran into the problem that rviz2 is not displaying the visuals (as seen in the figure) image description

However when I change the Description Source to File the visuales are displayed (see below) image description

Any idea how to solve this?

Edit: I am loading the urdf as follows:

       urdf = os.path.join(
           get_package_share_directory("prius_description"),
           "urdf", urdf_file_name)
       
       Node(
           package="robot_state_publisher",
           executable="robot_state_publisher",
           name="robot_state_publisher",
           namespace="prius",
           output="screen",
           parameters=[{"use_sim_time": use_sim_time, "robot_description": robot_desc}],
           arguments=[urdf]
        ),

Originally posted by GeorgNo on ROS Answers with karma: 183 on 2022-06-13

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Just after editing my question I realized I am using a namespace on the robot_state_publisher. Thus I needed to change the Description Topic in rviz2 to /prius/robot_description to make it work


Originally posted by GeorgNo with karma: 183 on 2022-06-13

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by MASAAB on 2023-03-04:
can you please elaborate on this, as I'm facing the same problem

Comment by GeorgNo on 2023-03-05:
In the case above I needed to change the topic on which to listen for the urdf file. However, on my current simulation I am facing the problem again and I don't know how to fix it. If you you find something please inform me, I will do so as well.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.