Can not generate trajectories
Hi, Thanks for your code.
However, our trajectory generation seems does not work well. We can not see a complete trajectory from the viewer.
The viewer shows trajectory generation procedure as follows,
And the recorded result in the file below.
2018-11-22-viewer.03.ppms.gz
Here is our code to generate trajectories.
Thanks for your help.
Hi, Try setting up following -->graph_renderer.cpp i=0 // line 192 -->rrts_main.cpp (i=0;i<1;i++) //line96 int t=0;t<100;t++ //line111
Thanks for pointing it out. I noticed the code is looping over environments rather than random start and goal. I have updated the code either use revised repo or modify the above line in your code and see if it works.
Hi, Thanks for your reply.
I still have some problems on generating trajectories. In rrt_main.cpp line 107,
https://github.com/ahq1993/MPNet/blob/94cebe23939968ecf489e331d35e0f9c8ce46772/data_generation/rrtstar/src/rrts_main.cpp#L107
Seems you read a graph_envno.data which contains the start and goal point. However, I can not find where to generate this graph file.
Can you help me to fix it?
Thank you very much.
@MzXuan Hi, I meet the same problem that can not see a trajectory from the viewer, even though I have updated the code and modify some lines. Do you fix it?
Thank you very much.
@doctorsrn No, I haven't..
Hi, Sorry for the late response. I have tested the code, and it is working perfectly fine. If you see line 111 in rrts_main.cpp, the algorithms loads graph files from the graph folder which I think aren't linked in your code. Here are the quick steps to make it work: 1- Download graph.zip and place the unzipped graph folder in the data_generation. 2- I also included the following lines (line 55-56) in the rrts_main.cpp string env_path="env"; mkdir(env_path.c_str(),ACCESSPERMS); The above lines will automatically create an "env" folder where the data_generation code will save the generated paths.
I tried your solution and it creates the following error:
error: expected constructor, destructor, or type conversion before ‘(’ token mkdir(env_path.c_str(),ACCESSPERMS); // create folder with env label to store generated trajectories
Do you know how to fix it? Or am I doing something wrong?
I moved line 56 to line 63 and then it compiles fine. I don't know if this is a proper fix.
@ahq1993
Hi,
Thanks for your reply. I follow your steps and meet the same error as @bbrito . After I move the line56 mkdir(env_path.c_str(),ACCESSPERMS); to the main function, it compiles with no error. And now the viewer and rrtstar works normally.
@ ahq1993 嗨, 谢谢您的答复。我按照您的步骤操作,遇到了与@bbrito相同的错误。将line56
mkdir(env_path.c_str(),ACCESSPERMS);移至main函数后,它编译无误。现在viewer和rrtstar可以正常使用。
I performed your operation, and there was no problem in compiling, but running the rrtstare and viewer executable files, the following situations occurred, can you help solve it?

@ ahq1993 嗨, 谢谢您的答复。我按照您的步骤操作,遇到了与@bbrito相同的错误。将line56
mkdir(env_path.c_str(),ACCESSPERMS);移至main函数后,它编译无误。现在viewer和rrtstar可以正常使用。I performed your operation, and there was no problem in compiling, but running the rrtstare and viewer executable files, the following situations occurred, can you help solve it?
![]()
I have met the same bug, did you solve it?