Hi all,
I am trying to build a circuit in Gazebo but I don't know how I can manage this task. In particular I don't know if I have to Necessarily create a .world file or I can just create a texture for example. I have an image of this circuit and also I can have a gis file, could these files help me?
Someone had already faced with this kind of work?
Thanks in advance.
[copied from comments by moderator]
I am sorry if I was so inaccurate. I am using Gazebo7 without ROS and I am writing some code for path plannig in autonomous cars scenario. As clarified today by my Ph.D. tutor I just have to update the ground plane texture at runtime. More in detail: I have a module that using Gazebo messages (I don't already know which ones) sends at certain time intervals an image that represents the actual state of the road (for example lanes) and I just want that Gazebo draws for me the new road
UPDATE
Hi all and Hi Peter, I tried to do do what you said but I am not sure that I have done the right things (in fact it doesn't work).
Actually I started from the tutorial at http://gazebosim.org/tutorials?tut=custom_messages&cat=transport to manage the messages and from your code to update the model.
More precisely:
1: I build a world in which I put a ground model with the texture that I have to modify at runtime.
2: I used all the code that I linked to manage the message exchange but in the function create() I put the code of my interest. I used this function because it seems that is the function that performs the operation when a message arrives. I modified the function in the following way (I commented the initFile because I don't know the perfect meaning and I don't know how to use it and if I have to use it):
public: void create(CollisionMapRequestPtr &msg)
{
std::cout << "Received message" << std::endl;
modelSDF.reset(new sdf::SDF);
std::cout << "After Reset"<InsertModelSDF(*modelSDF);
std::cout << "After inserting"<> ]
It is saying that cannot find the model but I am sure that the model is in the specified path.
Thanks in advance, I hope I was clear in
↧