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

rosbuild_add_executable. Where does it save this?

asked 2013-12-08 04:18:28 -0500

JP gravatar image

Hi everyone,

I used the command

rosbuild_add_executable(main_ParseStringCommand ${GUIA_SOURCE_FILES} ${GUIA_HEADER_FILES})

to my CMakeLists.txt.

I performed the:

$rosmake package_name

and ran the node by:

$rosrun package_name main_ParseStringCommand

I then changed the rosbuild_add_executable in my CMakeLists.txt to:

rosbuild_add_executable(main_ParseString ${GUIA_SOURCE_FILES} ${GUIA_HEADER_FILES})

and did: $rosmake package_name

Now, I can run the node by:

$rosrun package_name main_ParseString

but I can still run it by:

$rosrun package_name main_ParseStringCommand

Why is this the case and how can I stop this from happening?

Thanks!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2013-12-08 04:39:22 -0500

yigit gravatar image

updated 2013-12-08 04:47:01 -0500

It doesn't save anything AFAIK, rosmake just creates the executable. When you change the name of the executable it creates another one without deleting the old one.

If you want to stop this from happening, you can use the following command

rosmake --pre-clean

Inside your package if you list the executables with ls -l command, you can verify their creation time.

edit flag offensive delete link more

Comments

rosmake --pre-clean did not work but the ls -l command helped me to find where the executables are stored (in the bin folder). I just manually deleted the executables I no longer needed. Thanks!

JP gravatar image JP  ( 2013-12-08 04:57:44 -0500 )edit

Oh sorry for that. Now I wonder why it didn't work:) `--pre-clean` option makes rosmake call `make clean` first and I'd expect it to delete previously created executables. http://wiki.ros.org/rosmake#Usage By the way, is it a cpp package? Could you also please specify the ros distro you are using?

yigit gravatar image yigit  ( 2013-12-08 05:07:28 -0500 )edit

Its strange. I watch the bin file where the executables get created and it still retains the old executables. Its okay, I will just do the manual way of removing them (its faster also XD)

JP gravatar image JP  ( 2013-12-08 05:21:21 -0500 )edit

I am using row fuerte and I tried the command: rosmake --pre-clean package_name. It is also a cpp package.

JP gravatar image JP  ( 2013-12-08 05:22:10 -0500 )edit

Yeah, it is strange indeed. When I do the same in similar conditions, it works for me. Anyhow, I'm glad you solved the problem.

yigit gravatar image yigit  ( 2013-12-08 05:47:35 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2013-12-08 04:18:28 -0500

Seen: 378 times

Last updated: Dec 08 '13