Error in launching the MKZ car in my machine

Hi experts @staff

I had numerous issues to compile the Ros autonomous Vehicle in my distro version Melodic, in ubunut 18.04. However after a whole day of adjusting parameters I could compile it on my ws.

However when I try to simulate mkz vehicle (urdf.xacro description) I can not properly spawn it on my Gazebo 9.
I have these errors:

When I try to spawn the mkz.urdf (simple than xacro) I get this message that it was spawned.

And below is the visualization of what was opened in Gazebo (the car model is there written in left panel but does not appear in the simulation environment)

When I try the command: rosservice call /gazebo/get_world_properties ‘{}’
I get this:

This is my urdf launch file which “worked” without errors but not show the car

Could you please give me a feedback about why this model is not appearing in Gazebo? And if possible give a “solution” / recommendation to fix these vector and features issues?

I adjusted several config files .hhof this package to make it workable in my distro version. I just updated variables which returned errors for the right and new programming variables, such as the “Vector3” to Vector3d" the “GetRelativeLinear_vel” to RelativeLinear_Vel"…substitutions like that reccomended by the terminal and the forums…

Hi,

So several elements could be teh problem:

  1. Check that inside the package xml you have the export tag with

<export>
<gazebo_ros gazebo_model_path=“${prefix}/models”/>
</export>

  1. You have to copy the model package to the gazebo models path maybe.

  2. Try activating the visualization tag in gazebo client to see the collision meshes.

  3. Try different meshes to see if the meshes for some reason dont render in your machine.

  4. Convert the xacro to URDF in a kinetic system and use that URDF then in melodic. Although the best would be to mae the change to melodic.

ok @duckfrost

I tried the step 1 and 2. Still did not work. I will try the other 3. To be honest I did not understood how to proceed with the step 3. Could you explain me better where is this icon to be activated?

What I have done was activating collision in View tool. And appeared to me this orange enormous box
Would be this the step?

@duckfrost
The model is really there but does not appear. I could not activate self-collide and in-static for TRUE was not allowed. This mean something?

My ~/.gazebo directory did not have a models directory. So I created one and put all the “autonomous-vehicle” pkg there.
**vini@vini-Aspire:~/marcus_ws/src$ cp -rf autonomous_vehicle/ ~/.gazebo/models/
**
I copied the also for the both directories again…but instead all the pkg, just the meshes with the dae models inside of it to the directory above (~/.gazebo/models) and for the below:
“usr/share/gazebo-9/models”

The step to generate the urdf through the xacro file I also did not comprehend, because I dowloaded this pkg from robot ignite academy lesson. So I think this conversion was already done by you using Kinetic, or not?

The renderization of the machine I think is not the problem because I could excatly now spawn the prius on it


The only problem I face with prius is that the front wheels does not stoppping moving turning around, don’t know why…
I also copied the prius meshes which were in a different format than the mkz. the prius wer .obj meshes and the mkz uses .dae. However using the prius meshes (and the same path used for prius locate these meshes)) did not work, and these meshes did not appear in mkz simulation…

But I would like to spawn the mkz because it is with all navigation pkgs installed and working, so I would learn more and adapt to my reality project

I also tried to spawn the catvehicle (the same of the simulation) of this module.
And I get this several errors:

I think it is not possible to work with these models you worked in kinetic in my melodic distro isn’t it?

I am having this error often:
sh: 1: Bad substitution
[librospack]: error while executing command

Should I uninstall the ROS and Gazebo and Install again?

I think maybe there is some problem with my gazebo 9. after I trying install the ignition tools by source and later reinstall all the Gazebo 9…because I am not sure why this error of Bad substitution and librospack is always happening.

I can’t launch the car. I was trying launch prius from the demo_car.launch which I dowloaded the packages and now, just the city is spwaned and the Prius does not appear. please @staff experts. Could you imagine where is the problem. I really need and wish to work with a real car for my simulation project.

The original launch file is below:

So I tried to remove some features of the launch file and just start the prius with the world.
The result is that the car appears falling down (like no GRAVITY exists)
How can I fix this issue and the car remain static in origin position? Have I a Gazebo installation issue to solve?

The launch file I used below: