Ask Your Question
0

Modifying roscpp scripts (msg_gen.py)

asked 2016-11-17 15:35:51 -0500

jtbandes gravatar image

I would like to make local modifications to msg_gen.py for my packages. I've successfully modified C++ libraries in roscpp by using a copy of roscpp in my workspace, and these changes are picked up by other C++ packages/nodes which depend on the roscpp library.

However, when I modify roscpp/rosbuild/scripts/msg_gen.py, the changes don't actually take effect — it seems like the generate_messages() cmake function in my other packages somehow knows to use the system version (/opt/ros/indigo/share/roscpp/rosbuild/scripts/msg_gen.py).

What do I need to do so that generate_messages() can use the local, modified version of the message generator?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2016-11-17 16:45:02 -0500

Dirk Thomas gravatar image

You need to modify the code in the gencpp / genpy packages instead.

The code in roscpp/rosbuild is only used when you use rosbuild but since you are using catkin you need to modify the code in the above packages instead.

edit flag offensive delete link more

Comments

Thanks, that worked! I had to pull message_generation into my tree as well, to make it use my version of gencpp.

jtbandes gravatar image jtbandes  ( 2016-11-18 13:35:45 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-11-17 15:35:51 -0500

Seen: 48 times

Last updated: Nov 17 '16