0
$\begingroup$

Rosanswers logo

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?


Originally posted by steradiant on ROS Answers with karma: 29 on 2019-04-17

Post score: 1


Original comments

Comment by Carl D on 2019-04-17:
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

Comment by steradiant on 2019-04-18:
Yes, I've tried that but it didn't work.

Comment by Isha Dijcks on 2019-04-18:
Did you go to the CMake tab in the bottom and press reload?

Comment by steradiant on 2019-04-18:
Thanks! Seems to work now

Comment by Isha Dijcks on 2019-04-18:
If your problem is solved now, please accept my answer.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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/284786/setup-clion-with-ros/


Originally posted by Isha Dijcks with karma: 85 on 2019-04-18

This answer was ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.