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

Python and C++ nodes in the same package

asked 2014-05-11 21:17:39 -0600

Mehdi. gravatar image

I have a package containing some C++ nodes. How do I add a Python node using rosbuild?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
6

answered 2014-05-12 05:51:33 -0600

makokal gravatar image

Just create your python node, then make the script executable and all should be fine. But also consider why you would want to do this in the first place.

edit flag offensive delete link more

Comments

Why not, having for example Python node for robot's hearing and automatic speech recognition and C++ node for vision and image processing, both in robot interaction package.

Mehdi. gravatar image Mehdi.  ( 2014-05-12 15:45:47 -0600 )edit

I'm also curious as to why you advise to consider doing this. Oftentimes a simple interpreted script that can be edited on the fly works much better than a compiled application, at least in the research environment.

autonomy gravatar image autonomy  ( 2014-05-21 06:18:07 -0600 )edit
1

So if you had already implemented C++ code from older lectures/projects, you would bother translate it to Python first for the sake of on the fly editing?

Mehdi. gravatar image Mehdi.  ( 2014-05-21 15:47:30 -0600 )edit

No, unless it was completely unmaintainable, I would not bother translating any existing code because it would be a duplication of effort. I don't think we're talking about duplicating existing C++ nodes in Python, but rather having them live side-by-side.

autonomy gravatar image autonomy  ( 2014-05-22 03:20:03 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2014-05-11 21:17:39 -0600

Seen: 2,062 times

Last updated: May 12 '14