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

How to compile init.cpp in roscpp package?

asked 2011-12-15 04:23:01 -0600

sam gravatar image

I use sudo to edit init.cpp.

But whenever I add wrong syntax on that src, I can rosmake successfully on roscpp package and roscomm package.

Why roscpp & roscomm can't detect some sources are changed?

How can I compile /opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp/src/libros/init.cpp ?

Thank you~

edit retag flag offensive close merge delete

Comments

Why are you editing init.cpp?
Mac gravatar image Mac  ( 2011-12-15 04:43:03 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
4

answered 2011-12-15 04:59:08 -0600

dornhege gravatar image

updated 2011-12-16 03:16:22 -0600

The first reason would be that there probably is a ROS_NOBUILD file, so the package will not be built.

If it were not there you would probably get permission denied problems.

You should never edit any code that is installed in /opt. If you need to edit init.cpp, checkout the source code locally and overlay the path in ROS_PACKAGE_PATH, i.e. Install ROS from source.

Other than that, I would second Mac's question: Why are you editing init.cpp?

edit flag offensive delete link more

Comments

Because I want to trace how roscpp implement by using change sources to figure out the whole procedure in order to implement C# client libraries. I found just by reading docs is not enough.
sam gravatar image sam  ( 2011-12-16 02:50:10 -0600 )edit
By the way, is there any existing method to change source and rosmake to make some effect?
sam gravatar image sam  ( 2011-12-16 02:55:30 -0600 )edit
Well, for playing around with roscpp/init.cpp follow the source checkout method, i.e. build ROS basic functionality locally. I don't understand what you mean with the second comment.
dornhege gravatar image dornhege  ( 2011-12-16 03:15:02 -0600 )edit
What I mean is 'Can I change roscpp sources & compile & install it in order to write new ros c++ node with my roscpp packages?'. If I can do that, I just have powerful tool to trace the procedure of roscpp, so that I can write C# client libraries in the future.
sam gravatar image sam  ( 2011-12-16 12:07:43 -0600 )edit
Yes, definitely. Just install roscpp from sources.
dornhege gravatar image dornhege  ( 2011-12-17 06:23:48 -0600 )edit
I found that makefile doesn't support 'install' command. If I checkout roscpp and rosmake it, how to install it? Or just rosmake? Does it will conflict with the original roscpp package in /opt/...?
sam gravatar image sam  ( 2011-12-17 11:45:26 -0600 )edit
You just put it in your ROS_PACKAGE_PATH in front of the original ROS stacks.
dornhege gravatar image dornhege  ( 2011-12-18 02:37:41 -0600 )edit

Question Tools

Stats

Asked: 2011-12-15 04:23:01 -0600

Seen: 619 times

Last updated: Dec 16 '11