Nvidia Jetson TK1 Kernel和配置
ROS程序开机自启动
$ sudo update-rc.d -f beacool_rfkill remove
ROS程序错误处理集合
ROS底盘Base Controller研究
git使用记录
ROS底盘Base Controller研究 ros_arduino_bridge
ROS底盘Base Controller研究 Arduino硬件连接
EAI雷达坐标校正
RK3229 Android编译环境搭建和编译过程
版本号 | 代号 | 发布时间 |
---|---|---|
16.10 | Yakkety Yak | 2016/10/13 |
16.04 | Xenial Xerus | 2016/04/21 |
15.10 | Wily Werewolf | 2015/10/24 |
15.04 | Vivid Vervet | 2015/04/22 |
14.10 | Utopic Unicorn | 2014/10/23 |
14.04 | LTS Trusty Tahr | 2014/04/18 |
13.10 | Saucy Salamander | 2013/10/17 |
13.04 | Raring Ringtail | 2013/04/25 |
12.10 | Quantal Quetzal | 2012/10/18 |
12.04 LTS | Precise Pangolin | 2012/04/26 |
11.10 | Oneiric Ocelot | 2011/10/13 |
11.04(Unity成为默认桌面环境) | Natty Narwhal | 2011/04/28 |
10.10 | Maverick Meerkat | 2010/10/10 |
10.04 LTS | Lucid Lynx | 2010/04/29 |
9.10 | Karmic Koala | 2009/10/29 |
9.04 | Jaunty Jackalope | 2009/04/23 |
8.10 | Intrepid Ibex | 2008/10/30 |
8.04 LTS | Hardy Heron | 2008/04/24 |
7.10 | Gutsy Gibbon | 2007/10/18 |
7.04 | Feisty Fawn | 2007/04/19 |
6.10 | Edgy Eft | 2006/10/26 |
6.06 LTS | Dapper Drake | 2006/06/01 |
5.10 | Breezy Badger | 2005/10/13 |
5.04 | Hoary Hedgehog | 2005/04/08 |
4.10(初始发布版本) | Warty Warthog | 2004/10/20 |
Android设备信息获取 TelephonyManager
IMSI
国际移动用户识别码(IMSI:International Mobile Subscriber Identification Number)是区别移动用户的标志,储存在SIM卡中,可用于区别移动用户的有效信息。其总长度不超过15位,使用0~9的数字。
IMEI
IMEI(International Mobile
Equipment
Identity,移动设备国际识别码,又称为国际移动设备标识)是手机的唯一识别号码。IMEI俗称“手机串号”,存储在手机的EEPROM(俗称“码片”)里。
手机在生产时,就被赋予一个IMEI。IMEI由15位数字组成,每位数字仅使用0~9的数字。
IMEI是区别移动设备的标识,储存在移动设备中,可用于监控被窃或无效的移动设备。
IMEI码由GSM(Global System for Mobile
Communications,全球移动通信协会)统一分配,授权BABT(British approvals Board of
Telecommunications,英国通信认证管理委员会)审受。
很明显,IMSI是区别用户的,存储在SIM卡中,不同的SIM卡有不同的IMSI,而不同的运营商的SIM卡是不一样的,因此,通过读取用户的SIM卡中的IMSI可以区分用户使用的是哪个运营商的网络。(而wifi一般是通过IP来区分运营商和所在的地域,xG网络通过IMSI来区分)
IMEI是区别设备的,存储在手机的EEPROM中,因此IMEI常用来区分用户是否在同一手机上。
IMEI以及MEID解析和生成
IMEI是国际移动通讯设备识别号(International Mobile Equipment Identity)的缩写,用于GSM系统。
由15位数字组成,前6位(TAC)是型号核准号码,代表手机类型。接着2位(FAC)是最后装配号,代表产地。后6位(SNR)是串号,代表生产顺序号。最后1位(SP)是检验码。
(欧洲型号认证中心今年重新分配了IMEI,FAC被和TAC合并在一起,FAC码的数字统一从00开始,因此无论什么型号什么品牌其7,8位均是00、01、02或03这样向后编排)
MEID是移动通讯设备识别号(Mobile Equipment
IDentifier)的缩写,用于CDMA系统。
由15位16进制数字组成(一般使用前14位),前8位是生产商编号,后6位是串号,最后1位是检验码。
IMEI校验码算法:
(1).将偶数位数字分别乘以2,分别计算个位数和十位数之和
(2).将奇数位数字相加,再加上上一步算得的值
(3).如果得出的数个位是0则校验位为0,否则为10减去个位数
如:35 89 01 80 69 72 41 偶数位乘以2得到5*2=10 9*2=18 1*2=02 0*2=00 9*2=18
2*2=04 1*2=02,计算奇数位数字之和和偶数位个位十位之和,得到
3+(1+0)+8+(1+8)+0+(0+2)+8+(0+0)+6+(1+8)+7+(0+4)+4+(0+2)=63 =>
校验位 10-3 = 7
MEID校验码算法:
(1).将偶数位数字分别乘以2,分别计算个位数和十位数之和,注意是16进制数
(2).将奇数位数字相加,再加上上一步算得的值
(3).如果得出的数个位是0则校验位为0,否则为10(这里的10是16进制)减去个位数
如:AF 01 23 45 0A BC DE 偶数位乘以2得到F*2=1E 1*2=02
3*2=06 5*2=0A A*2=14 C*2=18 E*2=1C,计算奇数位数字之和和偶数位个位十位之和,得到
A+(1+E)+0+2+2+6+4+A+0+(1+4)+B+(1+8)+D+(1+C)=64 => 校验位 10-4 =
C
IMEI举例:
小米Note: 866032 02 129870 4.
华为Note:869819 02 084146 9
效验位符合以上算法。
private static String getimei15(String
imei){
if (imei.length() == 14) {
char[]
imeiChar=imei.toCharArray();
int
resultInt=0;
for (int i = 0; i < imeiChar.length; i++)
{
int
a=Integer.parseInt(String.valueOf(imeiChar[i]));
i++;
final int
temp=Integer.parseInt(String.valueOf(imeiChar[i]))*2;
final int
b=temp<</span>10?temp:temp-9;
resultInt+=a+b;
}
resultInt%=10;
resultInt=resultInt==0?0:10-resultInt;
return resultInt + "";
}else{
return "";
}
}
ROS学习 Parameter的设置与查询
// 1. std::string
std::string name;
std::string setparam = "SamTest:";
nh.setParam("InfoName", setparam);
nh.getParam("InfoName", name);
ROS_INFO("Get Name: %s", name.c_str());
// 2. char*
char des[] = "This is a test for parameter server!";
std::string des_string;
nh.setParam("Des", des);
nh.getParam("Des", des_string);
ROS_INFO("Get des: %s", des_string.c_str());
// 3. double
double linear = 10.0;
nh.setParam("Linear", linear);
linear = 0;
nh.getParam("Linear", linear);
ROS_INFO("Get Linear: %f", linear);
// 4. int
int count = 23;
nh.setParam("Count", count);
count = 0;
nh.getParam("Count", count);
ROS_INFO("Get cound: %d", count);
// 5. bool
bool enable = true;
nh.setParam("Enable", enable);
enable = false;
nh.getParam("Enable", enable);
if(enable)
ROS_INFO("Enable: TURE");
else
ROS_INFO("Enable: FALSE");
std::vector vector_string1;
std::vector vector_string2;
vector_string1.push_back("First Item");
vector_string1.push_back("Second Item");
vector_string1.push_back("Third Item");
nh.setParam("vec_str", vector_string1);
nh.getParam("vec_str", vector_string2);
ROS_INFO("vector size is %d", vector_string2.size());
std::vector::iterator it;
for(it=vector_string2.begin(); it!=vector_string2.end(); it++)
{
ROS_INFO("Get vector:%s", it->c_str());
}
// 7.std::vector
std::vector vector_float1;
std::vector vector_float2;
vector_float1.push_back(1.11f);
vector_float1.push_back(2.22f);
vector_float1.push_back(3.33f);
vector_float1.push_back(4.44f);
nh.setParam("vec_float", vector_float1);
nh.getParam("vec_float", vector_float2);
ROS_INFO("vector size is %d", vector_float2.size());
std::vector::iterator it_f;
for(it_f=vector_float2.begin(); it_f!=vector_float2.end(); it_f++)
{
ROS_INFO("Get vector:%f", *it_f);
}
nh.param("InfoName", second, "Other");
ROS_INFO("Get String: %s", second.c_str());
ros::NodeHandle::getParamCached() and ros::param::getCached()
nh.deleteParam("f_param");
Android下PID, UID, TID相关知识
EAI底盘和F4雷达的使用和解读
在dashgo_bringup/startup目录内,有以下几个文件:
create_rplidar_udev.sh
讲解:有/dev/ttyUSBx设备,vid=10c4, pid=ea60时,则创建它的软连接为:rplidar, 使用权限为666.
create_rplidar_udev_new.sh
echo 'KERNEL=="ttyACM*", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="5740", MODE:="0666", GROUP:="dialout", SYMLINK+="rplidar"' >/etc/udev/rules.d/rplidar.rules
有/dev/ttyACMx设备,vid=0483, pid=5740时,则创建它的软连接为:rplidar, 使用权限为666.
create_dashgo_udev.sh
echo 'KERNEL=="ttyACM*", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0042", MODE:="0666", GROUP:="dialout", SYMLINK+="dashgo"' >/etc/udev/rules.d/dashgo.rules
有/dev/ttyACMx设备,pid=0042, vid=2341时,则创建它的软连接为:dashgo, 使用权限为666.
如此,则/dev/rplidar, /dev/dashgo就非常明确的对应雷达和底盘了。
VID,PID可以使用lsusb得到。
roscd dashgo_bringup/startup sudo sh create_dashgo_udev.sh sudo sh create_rplidar_udev_new.sh
ROS 公用包学习解析 usb_cam
- The device the camera is on.
- Image width
- Image height
- Possible values are mjpeg, yuyv, uyvy
- Possible values are mmap, read, userptr
- The camera's tf frame
- The required framerate
- Contrast of video image (0-255)
- Brightness of video image (0-255)
- Saturation of video image (0-255)
- Sharpness of video image (0-255)
- Enable camera's autofocus
- If autofocus is disabled, the focus of the camera (0=at infinity)
- An url to the camera calibration file that will be read by the CameraInfoManager class
- The camera name. This must match the name in the camera calibration
2.2: launch文件例子:
ROS 公用包学习解析 image_transport
image_transport应该总被用在image订阅和发布上。它为低带宽压缩格式(compressed formats)image传输提供透明支持。例如:为JPEG/PNG压缩和视频流提供单独插件,为此类image提供传输(订阅和发布)。
1 // Do not communicate images this way!
2 #include /ros.h>
3
4 void imageCallback(const sensor_msgs::ImageConstPtr& msg)
5 {
6 // ...
7 }
8
9 ros::NodeHandle nh;
10 ros::Subscriber sub = nh.subscribe("in_image_topic", 1, imageCallback);
11 ros::Publisher pub = nh.advertise<<SPAN class=ID style="BOX-SIZING: border-box; COLOR: rgb(0,0,0)">sensor_msgs::Image>("out_image_topic", 1);
1 // Use the image_transport classes instead.
2 #include /ros.h>
3 #include /image_transport.h>
4
5 void imageCallback(const sensor_msgs::ImageConstPtr& msg)
6 {
7 // ...
8 }
9
10 ros::NodeHandle nh;
11 image_transport::ImageTransport it(nh);
12 image_transport::Subscriber sub = it.subscribe("in_image_base_topic", 1, imageCallback);
13 image_transport::Publisher pub = it.advertise("out_image_base_topic", 1);
{
ros::init(argc, argv, "image_publisher");
ros::NodeHandle nh;
image_transport::ImageTransport it(nh);
image_transport::Publisher pub = it.advertise("camera/image", 1);
sensor_msgs::ImagePtr msg = cv_bridge::CvImage(std_msgs::Header(), "bgr8", image).toImageMsg();
while (nh.ok()) {
pub.publish(msg);
ros::spinOnce();
loop_rate.sleep();
}
}
/camera/image/compressed
/camera/image/compressed/parameter_descriptions
/camera/image/compressed/parameter_updates
/camera/image/compressedDepth
/camera/image/compressedDepth/parameter_descriptions
/camera/image/compressedDepth/parameter_updates
/camera/image/theora
/camera/image/theora/parameter_descriptions
/camera/image/theora/parameter_updates
ROS 公用包学习解析<三> rgbd_launch
- Launch nodelets for generating raw and rectified monochrome and color images. Given bayer encoded images on the rgb/image_raw topic from the RGB-D driver, the rgb processing chain produces rgb/image_mono,rgb/image_rect_mono, rgb/image_color and rgb/image_rect_color.
- 控制是否启动nodelet去产生raw Data和校正(rectified)过的单色以及色彩Image。把从RGB-D driver读取的数据以bayer编码RGB编码放入 rgb/image_raw Topic中。同时产生rgb/image_mono,rgb/image_rect_mono, rgb/image_color and rgb/image_rect_color这系列Topic。
- Usage of this parameter requires rgb_processing to be true. Debayers the image into monochrome and color. If set to true then explanation for rgb_processing directly applies. If set to false the rgb processing chain only producesrgb/image_rect_color.
-
- If set to true, rectifies the raw IR image (ir/image_raw -> ir/image_rect_raw)
- $(find rgbd_launch)/launch/includes/ir.launch.xml
- Given the raw depth image, rectifies it, converts both the raw and rectified images to metric format (uint16 ->float), and produces a pointcloud. Requires depth/image_raw. Produces depth/image_rect_raw (rectified),depth/image (metric), depth/image_rect (rectified, metric), depth/points (pointcloud).
-
- Generates a registered RGBD pointcloud from the device data (requires rgb_processing to be enabled). A pointcloud can be generated through a software registration pipeline (sw_registered_processing = true, used when depth_registration for device driver is set to false ) by registering the depth image from the depth frame to an RGB frame and merging with the RGB image. If software registration is being used, depth_processing needs to be enabled. Alternatively, the device can be directly asked to generate a registered depth image in the RGB frame with can be merged with the RGB Image through the hardware registration pipeline (hw_registered_processing = true, used when depth_registration for device driver is set to true)
- Generates a disparity image from unregistered depth data (i.e. in the depth frame). Converts depth/image_rect_rawand projector/camera_info into the disparity image depth/disparity. Requires depth_processing to be enabled.
- Enables the software registration pipeline. depth/image_rect_raw ->depth_registered/sw_registered/image_rect_raw (registered) -> depth_registered/points ANDdepth_registered/disparity.
- Enables the hardware registration pipeline. depth/image_raw -> depth_registered/hw_registered/image_rect_raw(rectified) -> depth_registered/points AND depth_registered/disparity.
RAW RGB与Bayer RGB
对于Sensor来说,Bayer RGB和RAW RGB两者的图象结构都是BG/GR的。(Bayer pattern说的是COLOR FILTER的结构,分为两种:STD Bayer pattern 与Pair pattern,其中STD Bayer pattern的结构是BG/GR的,而Pair Pattern顾名思义是指BGBG/GRGR的结构,即以四行为一个单位,前两行是BG的结构,后两行是GR的结构,这种结构是美光专门为此申请了专利的,主要是在输出TV模式(NTSC/PAL制)时用到).
ROS 公用包学习解析 image_proc, depth_image_proc
$ ROS_NAMESPACE=my_camera rosrun image_proc image_proc
Subscribed Topics
image_raw (sensor_msgs/Image)- Raw image stream from the camera driver.
- Camera metadata.
Published Topics
image_mono (sensor_msgs/Image)- Monochrome unrectified image.
- Monochrome rectified image.
- Color unrectified image.
- Color rectified image.
image_proc Nodelets模式:
ROS学习 <十一> ROS Nodelet学习
nodelet usage:
nodelet load pkg/Type manager - Launch a nodelet of type pkg/Type on manager manager
在Manager内,载入一个Nodelet。pkg为包名,Type为Class名(或库名)
nodelet standalone pkg/Type - Launch a nodelet of type pkg/Type in a standalone node
以standalone模式Load和启动一个Nodelet
nodelet unload name manager - Unload a nodelet a nodelet by name from manager 从Manager内卸载一个Nodelet。
nodelet manager - Launch a nodelet manager node
启动一个Nodelet Manager