Fatal Error : While trying to use c_generwated_code with ROS

Hi :wave:

I had previously made a solver for a Kinematic robot using Acados Python Interface.

I need to use the c_generated_code for making a ROS simulation but I am getting the following error:

[ 66%] Built target package_generate_messages
In file included from /mnt/c/Users/91919/acados/acados/utils/print.h:39,
                 from /mnt/c/Users/91919/mob_robot/mod_robot_sim/src/package/src/publisher_node.cpp:8:
/mnt/c/Users/91919/acados/acados/dense_qp/dense_qp_common.h:40:10: fatal error: hpipm/include/hpipm_d_dense_qp.h: No such file or directory
   40 | #include "hpipm/include/hpipm_d_dense_qp.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [package/CMakeFiles/publisher_node.dir/build.make:63: package/CMakeFiles/publisher_node.dir/src/publisher_node.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:934: package/CMakeFiles/publisher_node.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
Invoking "make -j8 -l8" failed

I have tried:

  • Reinstalling acados
  • Sourcing Acados root file and lib file
  • Adding Acados to path and bashrc
  • hpipm_d_dense_qp.h is present in the include directory

My cmake file for ROS1:

cmake_minimum_required(VERSION 3.0.2)
project(package)

include_directories(/mnt/c/Users/91919/acados)
include_directories(/mnt/c/Users/91919/mob_robot/c_generated_code)

set(acados_include "/mnt/c/Users/91919/acados/include")

## Compile as C++11, supported in ROS Kinetic and newer
# add_compile_options(-std=c++11)

## Find catkin macros and libraries
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
## is used, also find other catkin packages
find_package(catkin REQUIRED COMPONENTS
  roscpp
  rospy
  std_msgs
        genmsg
)


## Generate added messages and services with any dependencies listed here
 generate_messages(
   DEPENDENCIES
   std_msgs
 )

###########
## Build ##
###########

## Specify additional locations of header files
## Your package locations should be listed before other locations
include_directories(
# include
  ${catkin_INCLUDE_DIRS}
)


## Declare a C++ executable
## With catkin_make all packages are built within a single CMake context
## The recommended prefix ensures that target names across packages don't collide
 add_executable(publisher_node src/publisher_node.cpp)

## Add cmake target dependencies of the executable
## same as for the library above
 add_dependencies(publisher_node ${publisher_node_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})

## Specify libraries to link a library or executable target against
 target_link_libraries(publisher_node
   ${catkin_LIBRARIES}
 )

I am unable to figure out if the problem is with acados installation or with the way my ROS project is linked with Cmake.

Any help would be appreciated!
Best regards,
Aditya.