书中,第8章主要介绍了ROS与Matlab和Android的接口,以及集成使用的方法。
之前的博文也提过一些,不做具体介绍,只列举一些有趣的示例:
Matlab官方文档:
----https://cn.mathworks.com/help/robotics/robot-operating-system-ros.html
Access ROS networks, robots, and simulators
Robotics System Toolbox™ enables you to interface with ROSand use ROS functionality in MATLAB® and Simulink®. You canconnect to a ROS network, collect data, send and receive your ownmessages, and deploy code to a standalone system. To get started,you must first connect to a ROS network. See Get Started with ROS.
Frequently Viewed Topics
----https://cn.mathworks.com/matlabcentral/fileexchange/50640-ros-gui?s_tid=srchtitle
version 1.0 (35.5 KB) by James
GUI to connect to ROS master .
This GUI simplifies connection to a ROS Network. It also has built-in teleoperation features. Step 1: On the 'Connection' panel, set the IP address of the Master node.
Step 2: Click 'Connect'. Successful connection will result output like this 'Initializing global node /matlab_global_node_88657 with NodeURI http://192.168.2.100:57590/' appearing on Matlab command prompt.
Step 3: On the 'Topics' panel, click on 'List out Topics' to see the topics available. Select the topics that you wish to publish/subscribe and click 'Publish' or 'Subscribe'.
Step 4: On the 'Nodes' panel, click on 'List out Nodes' to see the nodes available. Their respective subscriptions, publications and services are shown on the right.
Step 5: Use the Control buttons (Move Front, Move Right...etc) to control the simulated robot in gazebo or the actual robot.
----https://github.com/jhu-asco/gazebo_rosmatlab_bridge/wiki
This package provides a gazebo plugin and a mex interface for fast communication between matlab and Gazebo. The mex interface provides fast access to link and joint states; easy application of link and joint efforts; way to set model and joint states. Various matlab examples have been provided in MATLAB
Prerequisite installations:
Install hydro for ubuntu 12.04 and indigo for ubuntu 14.04.
Download PQP from here; Untar the file and run make in the folder. If you are running a 64 bit operating system you should add the following lines to the Makefile :
Add these lines after "CFLAGS = -O2 -I." in Makefile for x86_64 systems
CFLAGS += -fPIC
CPPFLAGS += -fPIC
Once compiled copy the files into your system using the following commands:
make
sudo cp -r include /usr/local/include/PQP
sudo cp lib/libPQP.a /usr/local/lib/libPQP.a
sudo ldconfig
For Hydro/Indigo installation follow instructions here/here; Choose the Desktop-Full Install (Recommended) version when installing ROS.
Then to setup a catkin workspace follow the instructions here. Once the environment is setup run the following command:
echo "source ~/catkin_ws/devel/setup.bash">>~/.bashrc
Once the environment is setup, install the prerequisites:
For hydro:
sudo apt-get install ros-hydro-gazebo-ros ros-hydro-gazebo-ros-pkgs
For Indigo:
sudo apt-get install ros-indigo-gazebo-ros ros-indigo-gazebo-ros-pkgs
Go into catkin workspace (~/catkin_ws for above instructions)/src folder:
cd ~/catkin_ws/src
Clone the package from git:
git clone https://git.lcsr.jhu.edu/ggarime1/gazebo_rosmatlab_bridge.git
Run the setup_script.bash with the arguments as MATLAB_ROOT(Directory where MATLAB is installed) and ROS_WORKSPACE(~/catkin_ws) if you have followed instructions above)
Example Usage:
source setup_script /usr/local/MATLAB/R2014a ~/catkin_ws
After installing the main components, if PQP is installed, you can run "source pqp_setup.bash" to setup collision checking module.
Lookup documentation.pdf . Also Checkout Tutorials
Compile PQP with -fPIC under x86_64 systems since it produces static libraries
----https://github.com/unl-nimbus-lab/bag2matlab
This repo has Matlab and Python code for reading data from a ROS bag file directly into a Matlab workspace. See the documentation for bagReader.m and bagInfo.m for information on how to use the code. This requires Matlab and ROS to run. Tested with ROS Kinetic Kame, Matlab R2015b, and R2016b.
The bagReader() Matlab script reads all data from a bag for a given topic. Simply call bagReader.m with the bag name and the topic to read to get all of the data from that topic as a table. For example, bagReader('flight.bag', '/uav/pose') will read all of the data published on the '/uav/pose' topic that is stored within 'flight.bag'.
bagInfo() returns the names and types of all the topics in a bag. For example: bagInfo('flight.bag') will return two cell arrays, one with the topic names, and the other with the corresponding types.
For convenience, there is also a Matlab function for converting ROS images from sensor_msgs/Image messages to a representation Matlab can understand. This functionality is in rosImageToMatlab.m. Currently, only mono8 and bgr8 conversions are supported.
----https://github.com/horverno/sze-academic-robotics-projects
This repository contains various projects developed in the Széchenyi István University (SZE) located in Győr, Hungary.
Name: VrepMatlabInteroperation
Description: The aim of the project is to demonstrate the V-REP Remote API functions in MATLAB.
V-REP scene:
The same scene in MATLAB:
Name: NeobotixRobotFollowsHuman
Description: A project where humans are followed by a Neobotix moblie robot. You can watch a video on youtube about this project.
The scenario and the hardware components:
The illustration of the scenario:
Name: RoboticArmKinect
Description:A project to control an own developed robotic arm with the help of Kinect. You can watch a video on youtube about this project.
Name: VrepCsharpInteroperation
Description: The aim of the project is to demonstrate the V-REP Remote API functions in C#.
Name: RobotGridCoveragePathPlanning
Description: Some grid map (occupancy grid) based coverage path planning algorithms implemented in MATLAB.
The illustration:
----https://github.com/lagadic/matlab_ros_bridge
This page contains the source code of a set of Matlab C++ S-functions that can be used to:
This project is based on a work started by Martin Riedel and Riccardo Spica at the Max Plank Institute for Biological Cybernetics in Tuebingen (Germany).This fork is currently supported by Riccardo Spica and Giovanni Claudio at the Inria Istitute in Rennes (France).
The software is released under the BSD license. See the LICENSE file in this repository for more information.
Before proceeding with the next steps you need to configure Matlab mex compiler.
For Matlab 2014b and older, run matlab and type the following command in the command window:
mex -setup
When you get the following message:
Enter the number of the compiler (0-1):
Enter 1 to select the first option. This should create a mex option file in ~/.matlab/R2014a/mexopts.sh.Open this file and make sure that the correct version of the gnu compiler is used.
For Matlab 2015a and newer, run matlab and type the following commands in the command window
mex -setup
mex -setup C++
This should create two files in ~/.matlab/<matlab_version>/ named mex_C_glnxa64.xml and mex_C++_glnxa64.xml.Open mex_C++_glnxa64.xml and substitute all instances of "g++" and "$GCC" with "g++-4.7" (or 4.4 for older versions of Matlab).Open mex_C_glnxa64.xml and substitute all instances of "gcc" and "$GCC" with "gcc-4.7" (or 4.4 for older versions of Matlab).
The process of compiling the matlab_ros_bridge is not straightforward. The main problem is that MATLAB doesn't use the system distribution of boost but instead comes with its ows shipped version, which can be found in, e.g. 'matlabroot/bin/glnxa64/'.Since the mex files that we generate will run inside matlab it is important that they are linked against the same version of boost that is used in MATLAB. Moreover, since the mex files will also be linked to ROS libraries, we also need to recompile ROS and link it to the same version of boost.Finally we also need to compile everyting (boost, ros and our mex files) using a c/c++ compiler officially supported by the MATLAB distribution that we are using.
###Compiling boost
This section will guide you through the process of compiling the required version of boost with the compiler supported by your Matlab version. Before doing this you should try using one of the precompiled boost distributions available in the download section of this repository. Check the version correspondance table below in this page to find the correct download link.If you cannot find a precompiled boost download link for you setup then keep reading, otherwise skip to the following section.
Note: while building Boost you might encounter this pseudo-bug due to an incompatibility between older versions of Boost and the new C11 standard. To solve this you can either substitute all occurrences of TIME_UTC
in all Boost headers with TIME_UTC_
(as done in more recent versions of Boost). For istance, in version 1.49.0, you need to modify <boost_dir>/boost/thread/xtime.hpp and <boost_dir>/libs/thread/src/pthread/timeconv.inl.
In some cases you might be able to solve this issue by modifying <boost_dir>/project-config.jam so as to change
using gcc : 4.4 : g++-4.4 ;
to
using gcc : 4.4 : g++-4.4 : -U_GNU_SOURCE ;
If you are building boost on a x64 system you might also encounter this bug. In this case just apply the proposed fix.
http://wiki.ros.org/<distro>/Installation/Source
(e.g. for Indigo), to install ROS-Comm in the "wet" version until you need to compile. DON'T COMPILE NOW (it means that you don't have to do a catkin_make or catkin_make_isolated). To reduce the number of ros packages to compile, you can also initialize your workspace with
$ rosinstall_generator roscpp geometry_msgs std_msgs sensor_msgs shape_msgs --rosdistro indigo --deps --wet-only --tar > mrb.rosinstall $ wstool init -j8 src mrb.rosinstall
install
at the end or run catkin_make install
if desired.For old versions of ROS (before Indigo) you may need to use the command catkin_make_isolated
instead of catkin_make
.Note: the incompatibility issue discussed in the previous section might cause rosbag
(and possibly other packages) to fail building. If this is the case, either substitute all occurrences of TIME_UTC
in all rosbag source files with TIME_UTC_
or add -DCMAKE_CXX_FLAGS=-U_GNU_SOURCE
to your catkin_make
command above.
matlab_ros_bridge
. It should be catkin_ws/build/
or catkin_ws/build_isolated/matlab_ros_bridge
if you used catkin_make_isolated
. Now generate the simulink block library by running:
$ cmake . $ make generate_library
/path/to/your/catkin_ws/src/matlab_ros_bridge/matlab_ros_bridge/models
and type
Tsim = 2e-5;
Now open the model test.slx
and try to run it in all different running mode.
It might be possible (but it has never been tested) to avoid compiling boost and try to link ros and the mex files against the boost libraries contained in the MATLAB installation directory.
Matlab version | gcc supported version | shipped boost vesion | compiled boost download | Matlab compiled version |
---|---|---|---|---|
2012a | GNU gcc/g++ 4.4.x | 1.44.0 | boost_1_44_0_gcc_4_4.tar.bz2 | boost_R2012a_x64.tar.gz |
2012b | GNU gcc/g++ 4.4.x | 1.44.0 | boost_1_44_0_gcc_4_4.tar.bz2 | boost_R2012b_x64.tar.gz |
2013a | GNU gcc/g++ 4.4.x | 1.49.0 | boost_1_49_0_gcc_4_4.tar.bz2 | boost_R2013a_x64.tar.gz |
2013b | GNU gcc/g++ 4.7.x | 1.49.0 | boost_1_49_0_gcc_4_7.tar.bz2 | boost_R2013b_x64.tar.gz |
2014a | GNU gcc/g++ 4.7.x | 1.49.0 | boost_1_49_0_gcc_4_7.tar.bz2 | boost_R2014a_x64.tar.gz |
2015a | GNU gcc/g++ 4.7.x | 1.49.0 | boost_1_49_0_gcc_4_7.tar.bz2 | boost_R2014a_x64.tar.gz |
2015b | GNU gcc/g++ 4.7.x | 1.49.0 | boost_1_49_0_gcc_4_7.tar.bz2 | boost_R2014a_x64.tar.gz |
2016a | GNU gcc/g++ 4.7.x | 1.56.0 | boost_1_56_0_gcc_4_7.tar.bz2 | boost_R2016a_x64.tar.gz |
2017a | GNU gcc/g++ 4.9.x | 1.56.0 | N/A | boost_R2017a_x64.tar.gz |
Ros\Matlab | 2013b | 2014a | 2014b | 2015a | 2015b | 2016a | 2017a |
---|---|---|---|---|---|---|---|
Hydro | working | working | never tested | never tested | never tested | never tested | never tested |
Indigo | never tested | working | working | working | working | working | never tested |
Kinetic | never tested | never tested | never tested | never tested | never tested | never tested | not working |
----
rosjava
https://github.com/rosjava
----https://github.com/hitcm/Android_Camera-IMU
Wifi data aquistion between Android and ROS
More information,get in my blog in Chinese!http://www.cnblogs.com/hitcm/p/5616364.html
----https://github.com/hibernate2011/RosClient
Android communicate with ROS(Robot Operating System),based on rosbridge protocol
see more in my blog http://xxhong.net/ (In Chinese)
Copyright 2016 xxhong
Licensed under the Apache License, Version 2.0 (the "License");you may not use this file except in compliance with the License.You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, softwaredistributed under the License is distributed on an "AS IS" BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.See the License for the specific language governing permissions andlimitations under the License.
----
ros-android
https://github.com/ros-android
----https://github.com/ros-autom/RobotCA
ROS-autom Team
This project is active again.
Prepare your distro for compile:
Optional:Run
and finally run our script
Troubleshoot
If you get aapt exited with code 127 ,please runsudo apt-get install lib32z1 lib32ncurses5 lib32stdc++6
Credits
ros-autom team, Thessaloniki of Greece 2017
Originally posted by:
University of South Carolina
CSCE 490 & 492 Capstone Design
Our project is to design an Android application to control a robot. Specifically, the goal is to create a native Android tablet application to interface with a Robot Operating System (ROS) robot, Clearpath Robotics' HUSKY model, for direct drive, diagnostic, and navigation information. The application will have to process data from various sensors on the robot and display the information in a user understandable fashion. For example, the robot will have a laser ranging system which will be collecting data on the environment. The application must parse this data and display the environment that the robot "sees".
Download from the Google Play Store today!
Dependencies:
Client Information: Dr. Ioannis Rekleitis Assistant Professor University of South Carolina
----ROS2 for Java
JRE
Android
This is a set of projects (bindings, code generator, examples and more) that enables developers to write ROS2applications for the JVM and Android.
Besides this repository itself, there's also:
No, any language that targets the JVM can be used to write ROS2 applications.
Yep! Make sure to use Fast-RTPS as your DDS vendor and at least this revision.
The current set of features include:
First of all, download the ament repositories in a separate workspace:
mkdir -p ~/ament_ws/src
cd ~/ament_ws
wget https://raw.githubusercontent.com/esteve/ament_java/master/ament_java.repos
vcs import ~/ament_ws/src < ament_java.repos
src/ament/ament_tools/scripts/ament.py build --symlink-install --isolated
We need to split the build process between Ament and the rest of ros2_java
workspace so that the additional build type for Gradle projects is picked up by Ament.
The following sections deal with building the ros2_java
codebase for the desktop Java runtime and for Android.
mkdir -p ~/ros2_java_ws/src
cd ~/ros2_java_ws
wget https://raw.githubusercontent.com/esteve/ros2_java/master/ros2_java_desktop.repos
vcs import ~/ros2_java_ws/src < ros2_java_desktop.repos
cd ~/ros2_java_ws/src/ros2/rosidl_typesupport
patch -p1 < ../../ros2_java/ros2_java/rosidl_typesupport_ros2_java.patch
cd ~/ros2_java_ws
. ~/ament_ws/install_isolated/local_setup.sh
ament build --symlink-install --isolated
Now you can just run a bunch of examples, head over to https://github.com/esteve/ros2_java_examples for more information.
The Android setup is slightly more complex, you'll need the SDK and NDK installed, and an Android device where you can run the examples.
Make sure to download at least the SDK for Android Lollipop (or greater), the examples require the API level 21 at least and NDK 14.
You may download the Android NDK from the official website, let's assume you unpack it to ~/android_ndk
mkdir -p ~/ros2_android_ws/src
cd ~/ros2_android_ws
wget https://raw.githubusercontent.com/esteve/ros2_java/master/ros2_java_android.repos
vcs import ~/ros2_android_ws/src < ros2_java_android.repos
cd ~/ros2_android_ws/src/ros2/rosidl
touch python_cmake_module/AMENT_IGNORE
touch rosidl_generator_py/AMENT_IGNORE
cd ~/ros2_android_ws/src/ros2/rosidl_typesupport
patch -p1 < ../../ros2_java/ros2_java/rosidl_typesupport_ros2_android.patch
cd ~/ros2_android_ws
. ~/ament_ws/install_isolated/local_setup.sh
ament build --isolated --cmake-args \
-DPYTHON_EXECUTABLE=/usr/bin/python3 \
-DEPROSIMA_BUILD=ON \
-DCMAKE_FIND_ROOT_PATH="$HOME/ament_ws/install_isolated;$HOME/ros2_android_ws/install_isolated" \
-DANDROID_FUNCTION_LEVEL_LINKING=OFF \
-DANDROID_TOOLCHAIN_NAME=arm-linux-androideabi-clang -DANDROID_STL=gnustl_shared \
-DANDROID_ABI=armeabi-v7a \
-DANDROID_NDK=$HOME/android_ndk/android-ndk-r14 \
-DANDROID_NATIVE_API_LEVEL=android-21 \
-DCMAKE_TOOLCHAIN_FILE=$HOME/android_ndk/android-ndk-r14/build/cmake/android.toolchain.cmake \
-- \
--ament-gradle-args \
-Pament.android_stl=gnustl_shared -Pament.android_abi=armeabi-v7a -Pament.android_ndk=$HOME/android_ndk/android-ndk-r14 --
You can find more information about the Android examples at https://github.com/esteve/ros2_android_examples
----https://github.com/lazyparser
Schedule and slides of my presentations. Invitations are welcome.
我的演讲的日程安排以及演讲资料下载。如果想要跟我做技术交流,欢迎给我发邮件 :)
如何需要下载单个幻灯片,可以点击对应的链接,选择raw格式查看,浏览器就会展示原始pdf文档,或自动下载。
如果你即将要开始变成一个小团队的负责人,那么这本书或许能够帮助到你。
可能你刚毕业不久,参加工作一年左右,得到了上司的认可开始带两三个新员工;可能你是高年级博士生,有几个硕士生围绕着你做项目;也可能你正在创业,需要组建一个小型技术团队来帮助你完成梦想。我们都能感到自己肩上的责任,领导的信任;但是团队管理这个事情好像并没有什么好说的:你拿到任务,分下去,过一段时间,收成果。这谁不会呢?
如果你在阅读完这本小册子之后,在日常的团队管理中能够有帮助,对于我而言是莫大的鼓励。如果有问题或勘误,欢迎与我联系讨论,我的邮箱是 lazyparser[at]gmail.com
。
这本小册子采用CC-BY-SA-NC方式发布,任何人都可以下载、打印、阅读传播。商业使用请联系我授权。本书的源代码是Markdown格式,托管在GitHub[1]上,可以根据自己需要转换成PDF、epub、azw、txt等多种格式。
[1] https://github.com/lazyparser/minimalist-team-leader
我们是中国科学院软件研究所协同创新中心(XLab)机器人组。目前主要从事机器人教学和研究平台XBot系列机器人的研发,开源机器人操作系统(ROS)的开发、培训、咨询服务,人工智能(主要是深度学习)在低功耗嵌入式环境中的应用。我们的工作完全开源,代码可以通过我们的GitHub网页浏览。我们提供以上领域的实习岗位,相信这份实习经历可以提高你的工程能力、团队协作能力等综合技能,并在未来的校招面试中脱颖而出。除此此外,我们的优势是:远程办公,不用挤地铁;项目完全开源,以GitHub作为托管平台,可以写进简历里。
我们相信并看重你的潜力。或许你现在还没有任何实习经历,不会ROS,没有做过实际项目。我们不需要你来自985或者211,也不需要你是计算机相关专业。只要你对我们的工作有兴趣,有强烈地上进心,希望能够有更强的技术能力,并且能够积极而谦卑地与他人一起共事,你就是我们正在寻找的人。我们尤其相信和看重女生在STEM领域的潜力。我们在过去几年数个不同项目的开发和管理经历让我们看到了很多优秀的女性实习生,出色的完成实习工作,有的在项目中逐渐承担起核心的职责。非常欢迎计算机(CS)、电子信息(EE)、以及软件工程(SE)领域的女生加入我们。
欢迎感兴趣的同学加入,可以发邮件给我。
你需要满足的条件:
git merge
,git rebase
等概念。工作内容: 具体岗位需求可能随时间变化,请查看我们的开放职位列表。
关于远程工作: 除了ROS设备相关的实习工作需要来软件所xlab现场调试机器人之外,其它岗位默认都是远程办公(or work from home)。
协作方式: 我们通过 slack + GitHub 作为主要的协作工具。偶尔也用微信/QQ。
实习工资: 很少,每月1500,基本上等于没有(尴尬)。
具体岗位需求可能随时间变化,请查看我们的开放职位列表。
以下是我们当前的实习生岗位需求,每个岗位的名额随时间可能会变,请直接发邮件询问。
(0人)安卓开发(Android Dev)
(5人)ROS开发(ROS Dev)
(1人)机器人测试开发(Robot Test Automation)
(3人)深度学习/机器学习(Deep Learning Engineering)
(0人)社区经理(Community Manager)
(0人)全栈网页开发(Full Stack Web Dev)
(0人)XBot/ROS机器人培训师(XBot/ROS Instructor)
----