ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
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_make
d 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.
2 | No.2 Revision |
I already trade
chmod +x
-ing mono_odometer.cpp. It is probably some gap in my knolwedge.
have you built your workspace (ie: catkin_make
d 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.
3 | No.3 Revision |
I already trade
chmod +x
-ing mono_odometer.cpp. It is probably some gap in my knolwedge.
have you built your workspace (ie: catkin_make
d 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.
4 | No.4 Revision |
I already trade
chmod +x
-ing mono_odometer.cpp. It is probably some gap in my knolwedge.
have you built your workspace (ie: catkin_make
d 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 iscatkin_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 source
d the devel/setup.bash
, what is the output of rospack find viso2_ros
?