https://wiki.archlinux.org/api.php?action=feedcontributions&user=Rbongers&feedformat=atomArchWiki - User contributions [en]2024-03-29T01:54:39ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=User:Rbongers&diff=577627User:Rbongers2019-07-19T01:10:31Z<p>Rbongers: Created page with "== About Me == Esoteric developer, currently robotics researcher. Links: * [https://github.com/rbong github]"</p>
<hr />
<div>== About Me ==<br />
<br />
Esoteric developer, currently robotics researcher.<br />
<br />
Links:<br />
<br />
* [https://github.com/rbong github]</div>Rbongershttps://wiki.archlinux.org/index.php?title=User_talk:Rbongers&diff=577626User talk:Rbongers2019-07-19T01:10:22Z<p>Rbongers: Move about me to user page</p>
<hr />
<div>== ROS 2 Build Branches ==<br />
<br />
Hi there! Nice to see others updating the ROS 2 page. :)<br />
<br />
I assume with your changes you are building ros2 master? Do you think we should have different dependency lists for different versions?<br />
<br />
:Hi! Yeah, the instructions led me to use master by default. I think it could get pretty complicated doing different dependencies for different branches - but maybe instructions to switch branches and focusing on the stable branch (if there is one) would be better? [[User:Rbongers|Rbongers]] ([[User talk:Rbongers|talk]]) 01:09, 19 July 2019 (UTC)</div>Rbongershttps://wiki.archlinux.org/index.php?title=User_talk:Rbongers&diff=577625User talk:Rbongers2019-07-19T01:09:44Z<p>Rbongers: Fix list</p>
<hr />
<div>== About Me ==<br />
<br />
Esoteric developer, currently robotics researcher.<br />
<br />
Links:<br />
<br />
* [https://github.com/rbong github]<br />
<br />
== Talk ==<br />
<br />
=== ROS 2 Build Branches ===<br />
<br />
Hi there! Nice to see others updating the ROS 2 page. :)<br />
<br />
I assume with your changes you are building ros2 master? Do you think we should have different dependency lists for different versions?<br />
<br />
:Hi! Yeah, the instructions led me to use master by default. I think it could get pretty complicated doing different dependencies for different branches - but maybe instructions to switch branches and focusing on the stable branch (if there is one) would be better? [[User:Rbongers|Rbongers]] ([[User talk:Rbongers|talk]]) 01:09, 19 July 2019 (UTC)</div>Rbongershttps://wiki.archlinux.org/index.php?title=User_talk:Rbongers&diff=577624User talk:Rbongers2019-07-19T01:09:22Z<p>Rbongers: Respond to post about ROS 2 build branches, add basic info</p>
<hr />
<div>== About Me ==<br />
<br />
Esoteric developer, currently robotics researcher.<br />
<br />
Links:<br />
<br />
- [https://github.com/rbong github]<br />
<br />
== Talk ==<br />
<br />
=== ROS 2 Build Branches ===<br />
<br />
Hi there! Nice to see others updating the ROS 2 page. :)<br />
<br />
I assume with your changes you are building ros2 master? Do you think we should have different dependency lists for different versions?<br />
<br />
:Hi! Yeah, the instructions led me to use master by default. I think it could get pretty complicated doing different dependencies for different branches - but maybe instructions to switch branches and focusing on the stable branch (if there is one) would be better? [[User:Rbongers|Rbongers]] ([[User talk:Rbongers|talk]]) 01:09, 19 July 2019 (UTC)</div>Rbongershttps://wiki.archlinux.org/index.php?title=ROS&diff=577617ROS2019-07-18T20:33:01Z<p>Rbongers: Add missing dependencies for building ROS 2 from source. poco, python-nose, numpy, lark, and rosdep must all be installed or build errors will be encountered.</p>
<hr />
<div>[[Category:Science]]<br />
[[ja:ROS]]<br />
[http://www.ros.org ROS] is an open-source, meta-operating system for your robot. It provides the services you would expect from an operating system, including hardware abstraction, low-level device control, implementation of commonly-used functionality, message-passing between processes, and package management.<br />
<br />
== Installation Instructions ==<br />
<br />
You can install any of the ROS distributions below since they are fully released on AUR.<br />
<br />
Melodic {{AUR|ros-melodic-desktop-full}}<br />
<br />
Lunar {{AUR|ros-lunar-desktop-full}}<br />
<br />
== Older Versions (Not fully working) ==<br />
<br />
=== Kinetic ===<br />
<br />
Kinetic packages on the AUR are a work in progress. There are [https://github.com/bchretien/arch-ros-stacks/issues/57#issuecomment-228612399 some issues regarding opencv3] that have not been fully resolved yet (installing {{AUR|ros-kinetic-opencv3}} works, but is somewhat inefficient since it rebuilds opencv3). Currently, installing a metapackage such as {{AUR|ros-kinetic-ros-core}} or {{AUR|ros-kinetic-robot}} should bring in all required dependencies (see [https://paste.xinu.at/YXIz/] for the correct order).<br />
<br />
Packages are being added on an as-needed basis. Please post any issues with the current packages in their respective AUR comments section.<br />
<br />
== catkin_make ==<br />
<br />
Note that catkin uses python2, and therefore catkin_make may fail unless it explicitly uses python2. To do so, add the following alias to ~/.bashrc:<br />
<br />
alias catkin_make="catkin_make -DPYTHON_EXECUTABLE=/usr/bin/python2 -DPYTHON_INCLUDE_DIR=/usr/include/python2.7 -DPYTHON_LIBRARY=/usr/lib/libpython2.7.so"<br />
<br />
Another way is to use {{AUR|python-catkin_tools}} and to configure it by running the following command in your Catkin workspace.<br />
catkin config --cmake-args -DPYTHON_EXECUTABLE=/usr/bin/python2<br />
<br />
=== Using Catkin/ROS with an IDE ===<br />
==== CLion ====<br />
To make {{AUR|CLion}} support ROS packages, you can change the {{ic|Exec}} parameter of its desktop file ({{ic| ~/.local/share/applications/jetbrains-clion.desktop}}) as follows.<br />
Exec=bash -i -c "source /home/[username]/catkin_ws/devel/setup.sh;/opt/clion/bin/clion.sh" %f<br />
However, {{ic|/home/[username]/catkin_ws}} must be exchanged with your Catkin workspace. You can now open a Catkin project without {{Pkg|cmake}} complaining about missing packages, hopefully.<br />
If desired or needed you can use Python 3 by adding {{ic|1=-DPYTHON_EXECUTABLE=/usr/bin/python3}} to the CMake options which can be found in the settings.<br />
<br />
== catkin build ==<br />
<br />
For configuring the systems using the {{ic|catkin build}} environment, one have to configure the catkin workspace as usual and issue a<br />
<br />
catkin config -DPYTHON_EXECUTABLE=/usr/bin/python2 -DPYTHON_INCLUDE_DIR=/usr/include/python2.7 -DPYTHON_LIBRARY=/usr/lib/libpython2.7.so<br />
<br />
Afterwards, use {{ic|catkin build}} as normal. Please remember to reconfigure your catkin whenever you delete the configuration files (i.e. the {{ic|catkin_ws}} directory)<br />
<br />
== Rebuild when shared libraries are updated ==<br />
<br />
When you update a library that ROS depends on (e.g. Boost), all packages that link to it must be rebuilt. Most AUR helpers will not detect this situation. The following script will generate a list of all packages that are linked to missing so files:<br />
<br />
https://seangreenslade.com/h/snippets/ros-find-outofdate.py<br />
<br />
(Note that the script requires {{pkg|pyalpm}} to be installed.)<br />
<br />
== ROS 2 ==<br />
=== Building from source ===<br />
<br />
Build instructions are available at https://index.ros.org/doc/ros2/Installation/Dashing/Linux-Development-Setup/.<br />
<br />
Install build dependencies: {{Pkg|wget}}, {{Pkg|python}}, {{Pkg|python-yaml}}, {{Pkg|python-setuptools}}, {{Pkg|sip}}, {{Pkg|python-sip}}, {{Pkg|python-pyqt5}}, {{Pkg|git}}, {{Pkg|cmake}}, {{Pkg|asio}}, {{Pkg|tinyxml}}, {{Pkg|tinyxml2}}, {{Pkg|eigen}}, {{Pkg|libxaw}}, {{Pkg|glu}}, {{Pkg|qt5-base}}, {{Pkg|opencv}}, {{Pkg|hdf5}}, {{Pkg|vtk}}, {{Pkg|glew}}, {{Pkg|poco}}, {{Pkg|python-nose}}, {{Pkg|python-numpy}}, {{Pkg|python-lark-parser}}, {{AUR|python-vcstool}}, {{AUR|python-empy}}, {{AUR|log4cxx}}, {{AUR|python-colcon-common-extensions}}, {{AUR|python-rosdep}}.<br />
<br />
Fetch the sources:<br />
<br />
$ mkdir -p ~/ros2_ws/src<br />
$ cd ~/ros2_ws<br />
$ wget https://raw.githubusercontent.com/ros2/ros2/master/ros2.repos<br />
$ vcs import src < ros2.repos<br />
<br />
Presently some fixes are required:<br />
<br />
Edit {{ic|build/qt_gui_cpp/sip/qt_gui_cpp_sip/Makefile:12}}, replacing {{ic|$$[QT_INSTALL_LIBS]}} with {{ic|/usr/lib}}.<br />
[https://github.com/ros-visualization/rviz/issues/1382#issuecomment-507007580 Github issue]<br />
<br />
Create a symbolic link to fix {{ic|fatal error: numpy/ndarrayobject.h: No such file or directory}}<br />
[https://github.com/ros2/rosidl_python/issues/66#issuecomment-507009953 Github issue]:<br />
<br />
# ln -s /usr/lib/python3.7/site-packages/numpy/core/include/numpy /usr/include/python3.7m/numpy<br />
<br />
Now you can build the workspace:<br />
<br />
$ cd ~/ros2_ws<br />
$ colcon build --symlink-install<br />
<br />
Read https://github.com/ros2/ros1_bridge/blob/master/README.md#build-the-bridge-from-source regarding ROS 1 / ROS 2 interoperability.<br />
<br />
=== Usage Examples ===<br />
<br />
First source the workspace:<br />
<br />
$ . ~/ros2_ws/install/local_setup.bash<br />
<br />
Functionality comparable to {{ic|roscore}}, {{ic|rosnode}}, {{ic|rostopic}}, {{ic|rosmsg}}, {{ic|rospack}}, {{ic|rosrun}} and {{ic|rosservice}} is available via {{ic|ros2}}:<br />
<br />
$ ros2 -h<br />
usage: ros2 [-h] Call `ros2 <command> -h` for more detailed usage. ... <br />
<br />
ros2 is an extensible command-line tool for ROS 2.<br />
<br />
optional arguments:<br />
-h, --help show this help message and exit<br />
<br />
Commands:<br />
daemon Various daemon related sub-commands<br />
msg Various msg related sub-commands<br />
node Various node related sub-commands<br />
pkg Various package related sub-commands<br />
run Run a package specific executable<br />
security Various security related sub-commands<br />
service Various service related sub-commands<br />
srv Various srv related sub-commands<br />
topic Various topic related sub-commands<br />
<br />
Call `ros2 <command> -h` for more detailed usage.<br />
<br />
A typical "Hello World" example starts with running a publisher node:<br />
<br />
$ ros2 topic pub /chatter 'std_msgs/String' "data: 'Hello World'"<br />
<br />
Then, in another terminal, you can run a subscriber (Don't forget to source the workspace in every new terminal):<br />
<br />
$ ros2 topic echo /chatter<br />
<br />
List existing nodes:<br />
<br />
$ ros2 node list<br />
publisher_std_msgs_String<br />
<br />
List topics:<br />
<br />
$ ros2 topic list<br />
/chatter<br />
<br />
ROS 2's version of rviz is <br />
<br />
$ rviz2</div>Rbongershttps://wiki.archlinux.org/index.php?title=ROS&diff=577613ROS2019-07-18T18:16:21Z<p>Rbongers: Added python-colcon-common-extensions to the list of build dependencies for ROS 2. colcon is required by the colcon build command later listed in the article.</p>
<hr />
<div>[[Category:Science]]<br />
[[ja:ROS]]<br />
[http://www.ros.org ROS] is an open-source, meta-operating system for your robot. It provides the services you would expect from an operating system, including hardware abstraction, low-level device control, implementation of commonly-used functionality, message-passing between processes, and package management.<br />
<br />
== Installation Instructions ==<br />
<br />
You can install any of the ROS distributions below since they are fully released on AUR.<br />
<br />
Melodic {{AUR|ros-melodic-desktop-full}}<br />
<br />
Lunar {{AUR|ros-lunar-desktop-full}}<br />
<br />
== Older Versions (Not fully working) ==<br />
<br />
=== Kinetic ===<br />
<br />
Kinetic packages on the AUR are a work in progress. There are [https://github.com/bchretien/arch-ros-stacks/issues/57#issuecomment-228612399 some issues regarding opencv3] that have not been fully resolved yet (installing {{AUR|ros-kinetic-opencv3}} works, but is somewhat inefficient since it rebuilds opencv3). Currently, installing a metapackage such as {{AUR|ros-kinetic-ros-core}} or {{AUR|ros-kinetic-robot}} should bring in all required dependencies (see [https://paste.xinu.at/YXIz/] for the correct order).<br />
<br />
Packages are being added on an as-needed basis. Please post any issues with the current packages in their respective AUR comments section.<br />
<br />
== catkin_make ==<br />
<br />
Note that catkin uses python2, and therefore catkin_make may fail unless it explicitly uses python2. To do so, add the following alias to ~/.bashrc:<br />
<br />
alias catkin_make="catkin_make -DPYTHON_EXECUTABLE=/usr/bin/python2 -DPYTHON_INCLUDE_DIR=/usr/include/python2.7 -DPYTHON_LIBRARY=/usr/lib/libpython2.7.so"<br />
<br />
Another way is to use {{AUR|python-catkin_tools}} and to configure it by running the following command in your Catkin workspace.<br />
catkin config --cmake-args -DPYTHON_EXECUTABLE=/usr/bin/python2<br />
<br />
=== Using Catkin/ROS with an IDE ===<br />
==== CLion ====<br />
To make {{AUR|CLion}} support ROS packages, you can change the {{ic|Exec}} parameter of its desktop file ({{ic| ~/.local/share/applications/jetbrains-clion.desktop}}) as follows.<br />
Exec=bash -i -c "source /home/[username]/catkin_ws/devel/setup.sh;/opt/clion/bin/clion.sh" %f<br />
However, {{ic|/home/[username]/catkin_ws}} must be exchanged with your Catkin workspace. You can now open a Catkin project without {{Pkg|cmake}} complaining about missing packages, hopefully.<br />
If desired or needed you can use Python 3 by adding {{ic|1=-DPYTHON_EXECUTABLE=/usr/bin/python3}} to the CMake options which can be found in the settings.<br />
<br />
== catkin build ==<br />
<br />
For configuring the systems using the {{ic|catkin build}} environment, one have to configure the catkin workspace as usual and issue a<br />
<br />
catkin config -DPYTHON_EXECUTABLE=/usr/bin/python2 -DPYTHON_INCLUDE_DIR=/usr/include/python2.7 -DPYTHON_LIBRARY=/usr/lib/libpython2.7.so<br />
<br />
Afterwards, use {{ic|catkin build}} as normal. Please remember to reconfigure your catkin whenever you delete the configuration files (i.e. the {{ic|catkin_ws}} directory)<br />
<br />
== Rebuild when shared libraries are updated ==<br />
<br />
When you update a library that ROS depends on (e.g. Boost), all packages that link to it must be rebuilt. Most AUR helpers will not detect this situation. The following script will generate a list of all packages that are linked to missing so files:<br />
<br />
https://seangreenslade.com/h/snippets/ros-find-outofdate.py<br />
<br />
(Note that the script requires {{pkg|pyalpm}} to be installed.)<br />
<br />
== ROS 2 ==<br />
=== Building from source ===<br />
<br />
Build instructions are available at https://index.ros.org/doc/ros2/Installation/Dashing/Linux-Development-Setup/.<br />
<br />
Install build dependencies: {{Pkg|wget}}, {{Pkg|python}}, {{Pkg|python-yaml}}, {{Pkg|python-setuptools}}, {{Pkg|sip}}, {{Pkg|python-sip}}, {{Pkg|python-pyqt5}}, {{Pkg|git}}, {{Pkg|cmake}}, {{Pkg|asio}}, {{Pkg|tinyxml}}, {{Pkg|tinyxml2}}, {{Pkg|eigen}}, {{Pkg|libxaw}}, {{Pkg|glu}}, {{Pkg|qt5-base}}, {{Pkg|opencv}}, {{Pkg|hdf5}}, {{Pkg|vtk}}, {{Pkg|glew}}, {{AUR|python-vcstool}}, {{AUR|python-empy}}, {{AUR|log4cxx}}, {{AUR|python-colcon-common-extensions}}.<br />
<br />
Fetch the sources:<br />
<br />
$ mkdir -p ~/ros2_ws/src<br />
$ cd ~/ros2_ws<br />
$ wget https://raw.githubusercontent.com/ros2/ros2/master/ros2.repos<br />
$ vcs import src < ros2.repos<br />
<br />
Presently some fixes are required:<br />
<br />
Edit {{ic|build/qt_gui_cpp/sip/qt_gui_cpp_sip/Makefile:12}}, replacing {{ic|$$[QT_INSTALL_LIBS]}} with {{ic|/usr/lib}}.<br />
[https://github.com/ros-visualization/rviz/issues/1382#issuecomment-507007580 Github issue]<br />
<br />
Create a symbolic link to fix {{ic|fatal error: numpy/ndarrayobject.h: No such file or directory}}<br />
[https://github.com/ros2/rosidl_python/issues/66#issuecomment-507009953 Github issue]:<br />
<br />
# ln -s /usr/lib/python3.7/site-packages/numpy/core/include/numpy /usr/include/python3.7m/numpy<br />
<br />
Now you can build the workspace:<br />
<br />
$ cd ~/ros2_ws<br />
$ colcon build --symlink-install<br />
<br />
Read https://github.com/ros2/ros1_bridge/blob/master/README.md#build-the-bridge-from-source regarding ROS 1 / ROS 2 interoperability.<br />
<br />
=== Usage Examples ===<br />
<br />
First source the workspace:<br />
<br />
$ . ~/ros2_ws/install/local_setup.bash<br />
<br />
Functionality comparable to {{ic|roscore}}, {{ic|rosnode}}, {{ic|rostopic}}, {{ic|rosmsg}}, {{ic|rospack}}, {{ic|rosrun}} and {{ic|rosservice}} is available via {{ic|ros2}}:<br />
<br />
$ ros2 -h<br />
usage: ros2 [-h] Call `ros2 <command> -h` for more detailed usage. ... <br />
<br />
ros2 is an extensible command-line tool for ROS 2.<br />
<br />
optional arguments:<br />
-h, --help show this help message and exit<br />
<br />
Commands:<br />
daemon Various daemon related sub-commands<br />
msg Various msg related sub-commands<br />
node Various node related sub-commands<br />
pkg Various package related sub-commands<br />
run Run a package specific executable<br />
security Various security related sub-commands<br />
service Various service related sub-commands<br />
srv Various srv related sub-commands<br />
topic Various topic related sub-commands<br />
<br />
Call `ros2 <command> -h` for more detailed usage.<br />
<br />
A typical "Hello World" example starts with running a publisher node:<br />
<br />
$ ros2 topic pub /chatter 'std_msgs/String' "data: 'Hello World'"<br />
<br />
Then, in another terminal, you can run a subscriber (Don't forget to source the workspace in every new terminal):<br />
<br />
$ ros2 topic echo /chatter<br />
<br />
List existing nodes:<br />
<br />
$ ros2 node list<br />
publisher_std_msgs_String<br />
<br />
List topics:<br />
<br />
$ ros2 topic list<br />
/chatter<br />
<br />
ROS 2's version of rviz is <br />
<br />
$ rviz2</div>Rbongers