robocomp/dsr-graph

fatal error: yolo_v2_class.hpp: No such file or directory

vaibhawkhemka opened this issue · 25 comments


yolo_error

Getting this error after running the command "make" in yolov4-tracker.
Any solution? @pbustos @JuanCarlosgg @orensbruli

Have you installed darknet following the steps here? https://github.com/robocomp/dsr-graph/tree/development/components/yolov4-tracker#installation

If so, are you able to compile other agents that use yolo like yolov4-detector?

Hi @JuanCarlosgg ,
Yes, I have installed darknet according to steps mentioned except I have set GPU=0 in Makefile as my system doesn't have GPU. But , I think error is not related with GPU.
And getting the same error with other agents as well that use yolo like yolov4-tracker.
What's your thought on this??

Can you check if darknet is installed in /home/robocomp/software/darknet/ or in /home/robocomp/darknet/?
In cmake it searches for the library in the first path, which differs from the installation instructions.

@JuanCarlosgg I have checked with both cases i.e /home/robocomp/software/darknet/ and also in /home/robocomp/darknet/.

Hello.

I have done a clean install of darknet to try to replicate the error. I used the yolov4-detector agent as a test as the yolov4-tracker agent is not in use at the moment and I think it needs some changes to work.

Everything works correctly if you move the darknet folder to software/ with the command mv /home/robocomp/darknet/ /home/robocomp/software/. Another tried option is to modify the darknet path in lines 23 and 24 of src/CMakeListsSpecific.txt to the installation path.

@JuanCarlosgg I have done the changes as suggested. As a Result ,Previous error has gone but a new error has popped up as shown below :
error

@vaibhawkhemka
I remember getting the same error, due to incompatible g++ (gcc) version.
What version are you using ?

@DarkGeekMS I am using gcc-10 and g++ -10 version

@DarkGeekMS @JuanCarlosgg The Error is resolved when I switched to gcc-8 version. Thanks
But a new error popped up as shown below:
error2

It is necessary to use gcc 10 to compile it because we use some features of c++20 that are available from that version.

This error #49 (comment) should be fixed by setting the -fno-char8_t option in the cmake compile flags. This is defined in the src/CMakeListSpecific.txt file of the agents in the add_definitions command (line 23 in yolov4-detector).

If the command does not appear in your file you probably have an outdated version of the repository. If it does appear in the file you may not have regenerated the cmake files.

@JuanCarlosgg It worked. Thanks.
But getting a new error "/usr/bin/ld: cannot find -ldarknet"
erro3

From the error it seems that the darknet .so file is not found. Check if it is in the /home/robocomp/software/darknet folder and if not, compile darknet again.

@JuanCarlosgg darknet .so file is not found even after compiling darknet again and giving outputs as follows after compiling darknet:
y1
y2
y3
y4

Same issue is mentioned in cannot find ldarknet, but unable to incorporate these changes. Hope u could help.

The command "-L/home/robocomp/software/darknet -ldarknet" on line 24 in the src/CMakeListsSpecific.txt file should be enough for it to find the lib, so I'm not sure what's happening.

Can you paste the result of the commands: locate libdarknet.so , ls /home/robocomp/software/darknet and the content of the file src/CMakeListsSpecific.txt.

@JuanCarlosgg locate libdarknet.so doesn't give any output.
ls /home/robocomp/software/darknet output as follows :
ls

content of file src/CMakeListsSpecific.txt. :
cmake

It looks like the libdarknet.so file is not in the folder. Check if the file exists in the darknet/build directory. If it exist, copy it to the darknet folder. If it does not, try to compile darknet again and if it gives a compile error, paste the message here.

@JuanCarlosgg libdarknet.so file is not present in darknet/build directory and compiling darknet again gives the same error.
e

So the problem is in the darknet compilation. Create a pastebin or a gist with the contents of the darknet Makefile and with the content of the file generated by the command make &> output.txt.

@JuanCarlosgg Is there any other component in dsr-graph except graspDSR and yolo components that is in good shape and working?? As I need to test any component to understand the code.

As you are not able to compile the agents that use Yolo you can try the navigation agents. All of them work properly (path_planner_astar, path_follower, elastic_band, mission_controller_viriato and a few more). You can also use the change_graph agent, which allows to inspect and modify the content of the graph, but this one behaves somewhat differently from normal agents.

In most cases you need to run ViriatoPyrep, idserver and viriatoDSR alongside your agents. Here you have access to a small tutorial to run DSR (https://github.com/robocomp/robocomp/blob/development/doc/DSR-start.md#dsrs-hello-world).

@JuanCarlosgg path_follower component is working but please explain how to use it like how the position of robot is changing/updating as I can't see any change in user interface.
path_follower

The navigation agents perform specific tasks. path_follower is only responsible for following a path generated by another agent. For the robot to move you must also execute path_planner_astar. In the 2D view of this agent you can select a point with right click and will generate a path for path_follower to start moving the robot.

@JuanCarlosgg ViriatoPyrep and ideserver is working fine but viriatoDSR is giving an error while compiling using current dsr-graph repo.
viriato

Pull the latest changes from the robocomp repository and recompile and install DSR.

cd ~/robocomp
git pull
cd build
cmake .. -DDSR=TRUE
make -j$(nproc)
sudo make install
sudo ldconfig

Then do a clean compilation of the agents you need to run.

@JuanCarlosgg It Worked. Thanks a lot