ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
From what I can tell, the core of your question is "how can I find the source code of a package?" Like Jayess mentioned, installing ROS packages from apt
won't download the source code to your computer. This is something I've ran into several times before, and I have a quick and dirty procedure for it:
gmapping
.gmapping
, this page is http://wiki.ros.org/gmapping. gmapping
is unique in this case, because they are mostly external to ROS. However, they provide a link on their page to the external documentation, which contains a link to the Github source code.gmapping
is unique because they aren't a native ROS project. At this point, I just had to do some smart Googling to find the real Github, specifically for the ROS gmapping code. Now, going to the launch file, we see that it starts a single node, named slam_gmapping
. This is the name of the executable started, so if we go over to the CMakeLists.txt, we see that this executable is compiled from slam_gmapping.cpp
and main.cpp
. Now you're at the start of the code!2 | No.2 Revision |
From what I can tell, the core of your question is "how can I find the source code of a package?"
A quicker way to do this, as pointed out by @gvdhoorn, is to add the following line to /etc/apt/sources.list.d/ros-latest.list
:
+ deb-src http://packages.ros.org/ros/ubuntu xenial main
Then, you can run
sudo apt-get source ros-ROSDISTRO-PACKAGE
to download a copy of all of the source code to the current directory. Now that you have the source, follow step 4 to find the main.
Like Jayess mentioned, installing ROS packages from apt
won't download the source code to your computer. This is something I've ran into several times before, and I have a quick and dirty procedure for it:
gmapping
.gmapping
, this page is http://wiki.ros.org/gmapping. gmapping
is unique in this case, because they are mostly external to ROS. However, they provide a link on their page to the external documentation, which contains a link to the Github source code.gmapping
is unique because they aren't a native ROS project. At this point, I just had to do some smart Googling to find the real Github, specifically for the ROS gmapping code. Now, going to the launch file, we see that it starts a single node, named slam_gmapping
. This is the name of the executable started, so if we go over to the CMakeLists.txt, we see that this executable is compiled from slam_gmapping.cpp
and main.cpp
. Now you're at the start of the code!