Visualization of iris model in rviz

Hello !
I have been trying to view the iris model in rviz. However I can only see the axes at the rotors(first screenshot). The respective urdf file is pretty straightforward like another urdf file having shapes like cylinder. However I am unable to see them like we see in gazebo. The second screen shot is my launch file in which I have added few lines starting from “generate urdf vehicle model”. Any help is appreciated. Thank you for your time on this !

@Coline, here is my result for your reference.

@Vrinda This is more of a ROS question, but you can add Markers that pull mesh sources to visualize your quad. You can see the documentation here

1 Like

Got it @Jaeyoung-Lim ! I will try using markers. Thanks much for getting back to me.

Hi @Vrinda,
In your launch file in the spawn_model node you are passing the parameter rotors_description. I believe it should be robot_description since you’ve renamed the param command above. I’d try that and see if that fixes your issue.

1 Like

Hi @Coline ! I fixed it ! Same problem still.

In the background of your rviz screen capture there are a bunch of red warnings/errors, it might be related to your issue. What are they saying?

Hello @Coline ! They are saying this,

Ok, so it can’t find the package rotors_description and that’s why it can’t load the appropriate mesh files. This is only a filepath issue, so it shouldn’t be too hard to fix hopefully (but it can get annoying). Here are some ideas:

  1. In the spawn model node there is the flag package_to_model. It is supposed to change occurrences of filename="package://rotors_description/... to filename="model://rotors_description/... . From what I understand it means it will look for the files in the specified gazebo_model_path (which is an environment variable and can be set manually, or in the bash file or in the launch file). So you could add rotors_description to the gazebo_model_path or copy paste it inside the current gazebo_model_path folder.
    However the error says that the package rotors_description cannot be found, so I don’t know if the package_to_model is doing its job properly.

  2. Modify the xacro files to give them an absolute file path instead of referencing the package rotors_description. I think everything you’d have to change would be in multirotor_base.xacro. For every mesh you would have to update the filename
    <mesh filename="package://rotors_description/meshes/${mesh_file}" scale="${mesh_scale}" />
    I remember there was some trick to reference an absolute path, like 3 slashes instead of 2 or something like that.
    I hope this helps. Good luck

1 Like

Trying @Coline ! Apologize for troubling you.

@Coline ! I tried both the steps you suggested to me. However the problem is still unsolved. But your answer definitely gave me some hints. I will work on it and keep you posted. Thanks once again !