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

node executable not reflecting code

asked 2017-10-20 08:05:49 -0500

errolflynn gravatar image

updated 2017-10-20 08:33:42 -0500

I am attempting to add a publisher to a node that I cloned from Github. When I change the program and rebuild, the compilation process works correctly, but the end executable doesn't follow the code changes. It is very confusing.

Example of code building working:

geometry_msgs::TwistStamped twist_msg; twist_msg.twist.angulad.x=4; yields error error: 'geometry_msgs::TwistStamped...' has no member 'angulad' ...

So I fix those errors and build with catkin build my_proj.

Then I run from a launch file: e.g. <node pkg="my_proj" type="my_node" name="my_node" output="screen"> <remap from="twist_topic" to="space/twist_topic"/> </node>

In this example, space/twist_topic doesn't show up, and neither do other changes. Including publishers that I have commented out will continue to publish. I have tried deleting this project from the build and devel spaces before building again. I see that when I delete them and try to launch the executable, they will fail to launch, reciting the error that they package/node doesn't exist. I then rebuild them with the new code, and the runtime doesn't reflect the changes that I've made. What's going on here and how do I fix it so that I can publish a new topic? Running ROS Indigo on Linaro Linux (Ubuntu 12.04).

Edit: I was able to solve this by removing the devel/.private/my_proj, devel/share/my_proj, devel/lib/my_proj, and build/my_proj folders. The issue must have been with the former two folders, as removing just the latter two did not work on prior attempts. Now subsequent builds follow the code changes. Anyone know particularly what happened here?

edit retag flag offensive close merge delete

Comments

I posted your results as an answer so that it can be marked resolved.

tfoote gravatar image tfoote  ( 2017-10-20 14:42:45 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-10-20 14:41:48 -0500

errolflynn gravatar image

I was able to solve this by removing the devel/.private/my_proj, devel/share/my_proj, devel/lib/my_proj, and build/my_proj folders. The issue must have been with the former two folders, as removing just the latter two did not work on prior attempts. Now subsequent builds follow the code changes. Anyone know particularly what happened here?

edit flag offensive delete link more

Comments

1

You likely had old versions of the executables on your path that you weren't clearing properly. Without your full console output and an example of your workspace it's hard to do more than guess.

tfoote gravatar image tfoote  ( 2017-10-20 14:43:30 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2017-10-20 08:05:49 -0500

Seen: 495 times

Last updated: Oct 20 '17