Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

catkin build fails -- Fails to find headers from ecl/ #9554

Closed
ana-GT opened this issue May 28, 2018 · 19 comments
Closed

catkin build fails -- Fails to find headers from ecl/ #9554

ana-GT opened this issue May 28, 2018 · 19 comments
Labels

Comments

@ana-GT
Copy link

ana-GT commented May 28, 2018

Describe the bug
Compiling Firmware as a ROS package using catkin build fails, due to catkin not finding headers located in the src/lib/ecl/ folder.

Firmware itself builds fine when I use standard: mkdir build && cd build && cmake .. && make. I used this approach when first trying out the PX4/Firmware software, but now I was going to proceed to use ROS, so I wanted to build the PX4/Firmware as a ROS package.

To Reproduce
Steps to reproduce the behavior:
0. Clone Firmware inside your ros_workspace/src folder (master branch)

  1. Build the package: cd ros_workspace/src && catkin build px4
  2. Build fails with messages of the type: "Cannot find ecl.h, not such file or directory"

PS.- FYI, I just tried building (catkin build) the Firmware version v1.7.3 and that works fine (I still have to test some launch files, but at least the ROS package compiling finished successfully). I'll report if this version works fine, since that might mean that the compilation error might have been introduced between then and the current master.

@dagar dagar added the bug label May 29, 2018
@dagar dagar added this to the Release v2.0.0 milestone May 29, 2018
@dagar
Copy link
Member

dagar commented May 29, 2018

@TSC21 could you add a basic catkin build to Jenkins?

Anything we want to keep working needs to be included in CI.

@lamping7 FYI

@TSC21
Copy link
Member

TSC21 commented May 29, 2018

@dagar I will but I can't promise to have it ready this week.

@lamping7
Copy link
Member

lamping7 commented Jun 7, 2018

Now that we're working toward a package to use for ROS sim/testing, do we want to support this additional build system? The idea is to make this more user friendly in the long run and only require building for dev purposes.

@ziggBee30
Copy link

Any conclusion on this issue, its still failing for me with same error while catkin build : "Cannot find ecl.h, not such file or directory"
Any comments ?

@mickey13
Copy link

I've been using "v1.7.3" until this is fixed. I'm not sure why this is closed.

@ziggBee30
Copy link

Exactly, i am not at all able to catkin build, px4 not prepared to use catkin environment

@dagar
Copy link
Member

dagar commented Jul 30, 2018

@mickey13 this isn't closed.

@dagar
Copy link
Member

dagar commented Jul 30, 2018

@TSC21 @lamping7 @jgoppert has anyone looked into fixing catkin?

@dagar
Copy link
Member

dagar commented Jul 30, 2018

Possible fix in #9679. Could someone please test it to see if your issue is fully resolved?

@varunvp
Copy link

varunvp commented Sep 16, 2018

How do you downgrade to Firmware v1.7.3?

@jannsta1
Copy link

In the firmware directory you can use: $ git checkout v1.7.3.

Hoping the issue is resolved soon as I have other incompatibilities with v1.7.3.

@mickey13
Copy link

I ended up building a ROS node in my simulation (Gazebo) package for starting instances of the latest PX4 firmware (so that I could use the latest version in my SITL setup):

#include <ros/ros.h>
#include <string>

int main(int argc, char** argv) {
  ros::init(argc, argv, "px4_node");
  ros::NodeHandle rosNode;
  ros::Rate rosRate(10.0);
  std::string executable = "${CATKIN_WS}/src/px4_firmware/build/posix_sitl_default/bin/px4";
  std::string argFmu = "${CATKIN_WS}/src/px4_firmware/ROMFS/px4fmu_common";
  std::string argRcS = "${CATKIN_WS}/src/px4_firmware/ROMFS/px4fmu_common/init.d-posix/rcS";
  int argId = 0;

  rosNode.param(ros::this_node::getName() + "/rcs", argRcS, argRcS);
  rosNode.param(ros::this_node::getName() + "/id", argId, argId);

  std::string command = executable + " " + argFmu + " -s " + argRcS + " -i " + std::to_string(argId) + " -d";
  system(command.c_str());

  while (rosNode.ok()) {
    ros::spinOnce();
    rosRate.sleep();
  }
  return 0;
}

Note you'll want to blacklist building this with catkin:

cd $CATKIN_WS
catkin config --blacklist px4
cd $CATKIN_WS/src/px4_firmware
make
cd $CATKIN_WS

This is just a workaround that I'm using until this issue is resolved.

@lamping7
Copy link
Member

What is the motivation for tightly-coupling PX4 within your ROS environment? I don't see an advantage to do this. This build system isn't actively supported for this project. Use PX4 as an independent node, launch with roslaunch, and build with the supported system. Is there a problem with the standard approach?

@mickey13
Copy link

My requirement (and I believe it's the same for others) is that I want to be able to run PX4 instances from my ROS workspace for each modeled UAV in my simulation environment. I don't consider that requirement "tightly-coupling PX4 within your ROS environment", as I include other non-PX4 packages via wstool and build them with catkin.

Since PX4 cannot be built with catkin any longer, nor is there a ROS package that can be downloaded, it's not obvious how to start PX4 processes in a standard simulation environment that uses ROS (i.e. you can't roscd into px4). What the node I mentioned above does is starts up a PX4 process so you can connect to it via MAVROS for any UAVs in your simulation environment.

@lamping7
Copy link
Member

lamping7 commented Sep 17, 2018

you can't roscd into px4

You sure can!

You just don't have your environment setup as described by the docs.

@lamping7
Copy link
Member

lamping7 commented Sep 17, 2018

Thumb down because why? You haven't displayed a need for this and you're just wrong.

See the image (v1.8.0 checkout):
screenshot from 2018-09-17 21-04-26

It's completely obvious how to start the firmware if you read the docs.

@TSC21
Copy link
Member

TSC21 commented Sep 30, 2018

Fixed in #10587.

@TSC21 TSC21 closed this as completed Sep 30, 2018
@incebellipipo
Copy link

incebellipipo commented Nov 15, 2018

Ladies and gentleman, i didn't want to upset you, but issue persist in version 1.8.1

Ros version: Kinetic
Linux Distro: Linux Mint 18.3 (Based on Ubuntu 16.04.5)
gcc: (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609

To generate error:

# create tmp workspace
mkdir -p ~/tmp_ws/src
cd ~/tmp_ws/src
# clone px4 source
git clone git clone https://github.com/PX4/Firmware.git
cd ~/tmp_ws/src/Firmware
# check out to version 1.8.1
git checkout v1.8.1
# rest should be familiar
git submodule update --init --recursive
cd ~/tmp_ws/
catkin_make

Here you are, error output:
image

Edit:
I rollback to version v1.7.3 . Problem is gone.

@dagar
Copy link
Member

dagar commented Nov 15, 2018

@incebellipipo the issue is fixed in PX4 master (what will be v1.9.0).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants