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

Revision history [back]

click to hide/show revision 1
initial version

I already trade chmod +x-ing mono_odometer.cpp. It is probably some gap in my knolwedge.

have you built your workspace (ie: catkin_maked it) before trying to execute the node?

You cannot "run" a .cpp file. You have to compile it first, then link it into an executable binary.

The binary is what you run.

All of that is done automatically for you if you build your workspace.

I already trade chmod +x-ing mono_odometer.cpp. It is probably some gap in my knolwedge.

have you built your workspace (ie: catkin_maked it) before trying to execute the node?

You cannot "run" a .cpp file. You have to compile it first, then link it into an executable binary.

The binary is what you run.

All of that is done automatically for you if you build your workspace.


The Instructibles page you link to also mentions that in the Building everything section.

It forgets to tell you to also source ~/odometry/devel/setup.bash though. Without that rosrun and/or roslaunch will not be able to find any of your new nodes.

I already trade chmod +x-ing mono_odometer.cpp. It is probably some gap in my knolwedge.

have you built your workspace (ie: catkin_maked it) before trying to execute the node?

You cannot "run" a .cpp file. You have to compile it first, then link it into an executable binary.

The binary is what you run.

All of that is done automatically for you if you build your workspace.


The Instructibles Instructables page you link to also mentions that in the Building everything section.

It forgets to tell you to also source ~/odometry/devel/setup.bash though. Without that rosrun and/or roslaunch will not be able to find any of your new nodes.

I already trade chmod +x-ing mono_odometer.cpp. It is probably some gap in my knolwedge.

have you built your workspace (ie: catkin_maked it) before trying to execute the node?

You cannot "run" a .cpp file. You have to compile it first, then link it into an executable binary.

The binary is what you run.

All of that is done automatically for you if you build your workspace.


The Instructables page you link to also mentions that in the Building everything section.

It forgets to tell you to also source ~/odometry/devel/setup.bash though. Without that rosrun and/or roslaunch will not be able to find any of your new nodes.


Edit:

Also yes, I know one cannot run a .cpp, but can the binary, thank you for wording it correctly!

Then why did you chmod +x a .cpp file?

I assume odometry is the name of the workspace, which is catkin_ws for me?

Yes, it is, but I used the name they give it on the page you linked to.

So yes, I did source ~/catkin_ws/devel/setup.bash, which is also in my .bashrc, which should mean I don't need to do it anyway?

No, that's not entirely true.

You have to source a workspace whenever you add or remove packages to from it. Having a source line in your .bashrc doesn't help in those cases, unless you open a new terminal whenever you add or remove packages to from the workspace.

So if you don't, you still have to source your workspace after building it.

Any other ideas why I'm not able to run the node? Any other common issues?

After having built your workspace, having sourced the devel/setup.bash, what is the output of rospack find viso2_ros?