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

Code completion Clion

asked 2019-04-17 10:22:24 -0600

steradiant gravatar image

Hello, I'm working with Clion to write C++ code for ROS. I just started with a simple publisher which publishes a message of the type

geometry_msgs::Pose msg;

When I want to do code completion, Clion tells me 'No suggestions for members of geometry_msgs::Pose. It also tells me, that

#include "geometry_msgs/Pose.h"

is not found. The code compiles and works fine though. How can I get the code completion for a easier code writing working?

edit retag flag offensive close merge delete

Comments

1

Did you try sourcing devel/setup.bash before launching CLion? ie. Run source devel/setup.bash and then from the same terminal run clion.sh

Carl D gravatar image Carl D  ( 2019-04-17 12:38:30 -0600 )edit

Yes, I've tried that but it didn't work.

steradiant gravatar image steradiant  ( 2019-04-18 00:00:37 -0600 )edit
1

Did you go to the CMake tab in the bottom and press reload?

Isha Dijcks gravatar image Isha Dijcks  ( 2019-04-18 03:42:17 -0600 )edit

Thanks! Seems to work now

steradiant gravatar image steradiant  ( 2019-04-18 03:46:03 -0600 )edit
1

If your problem is solved now, please accept my answer.

Isha Dijcks gravatar image Isha Dijcks  ( 2019-04-18 03:53:02 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-04-18 03:51:34 -0600

Isha Dijcks gravatar image

Make sure to reload the top-level CMake by right-clicking the file and press 'reload'. Or go to the CMake tab at the bottom and press 'reload'.

If you have more questions about setting up CLion with ROS, you can check this answer: https://answers.ros.org/question/2847...

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2019-04-17 10:22:24 -0600

Seen: 618 times

Last updated: Apr 18 '19