ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Catkin Eclipse Integration (Type 'sensor_msgs::PointCloud2' could not be resolved)

asked 2013-07-28 13:49:08 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

I am trying to use Eclipse with Catkin. I am having some problems with Index, for example, I have just tried to do this tutorial and Eclipse does not recognizes the index to "sensor_msgs::PointCloud2" (all these type).

I am able to compile the package into Eclipse(CTRL+B), it is working fine, my problem is with the Eclipse indexer.

My steps to make Eclipse compile catkin projects were:

cd ~/catkin_ws
$ catkin_make --force-cmake -G"Eclipse CDT4 - Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug -DCMAKE_ECLIPSE_MAKE_ARGUMENTS=-j8
$ source ~/catkin_ws/devel/setup.bash
$ eclipse

File -> Import -> General -> Existing Projects into Workspace...

When I open the .cpp file, I got some errors:

Type 'sensor_msgs::PointCloud2' could not be resolved
Type 'sensor_msgs::PointCloud2ConstPtr' could not be resolved
            ...

But, how I said, I`m able to compile the package, I just have NOT the indexes for this type.

Can you guys help me to make Eclipse index this?

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
1

answered 2013-07-29 00:22:58 -0500

I've had this problem a lot (using rosbuild, not catkin) when the Eclipse C++ indexer ran out of memory while indexing and crashed, leaving a bad index behind. Increasing the memory available to the Java VM by adding -vmargs -Xmx1500m to the eclipse call helped.

edit flag offensive delete link more
0

answered 2013-07-28 17:38:44 -0500

In essence, try to delete build and devel folders in catkin workspace and re-create Eclipse project (catkin_make --force-cmake ...). If it does not help do "Add contributed..." in the "C/C++ Include Paths and Symbols" project properties.

For detailed instructions, please check the answer on Gazebo Answers.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2013-07-28 13:49:08 -0500

Seen: 982 times

Last updated: Jul 29 '13