资源简介
ros机器人代码,激光雷达导航系统,slam
代码片段和文件信息
/*
* 3iRoboticsLIDAR System II
* Driver Interface
*
* Copyright 2017 3iRobotics
* All rights reserved.
*
* Author: 3iRobotics Data:2017-09-15
*
*/
#include “C3iroboticsLidar.h“
#include “CSerialConnection.h“
#define DEG2RAD(x) ((x)*M_PI/180.)
typedef struct _rslidar_data
{
_rslidar_data()
{
signal = 0;
angle = 0.0;
distance = 0.0;
}
uint8_t signal;
float angle;
float distance;
}RslidarDataComplete;
using namespace std;
using namespace everest::hwdrivers;
int main(int argc char * argv[])
{
int opt_com_baudrate = 230400;
string opt_com_path = “/dev/ttyUSB0“;
CSerialConnection serial_connect;
C3iroboticsLidar robotics_lidar;
serial_connect.setBaud(opt_com_baudrate);
serial_connect.setPort(opt_com_path.c_str());
if(serial_connect.openSimple())
{
printf(“[AuxCtrl] Open serail port sucessful!\n“);
printf(“baud rate:%d\n“serial_connect.getBaud());
}
else
{
printf(“[AuxCtrl] Open serail port %s failed! \n“ opt_com_path.c_str());
return -1;
}
printf(“C3iroboticslidar connected\n“);
robotics_lidar.initilize(&serial_connect);
while (1)
{
TLidarGrabResult result = robotics_lidar.getScanData();
switch(result)
{
case LIDAR_GRAB_ING:
{
break;
}
case LIDAR_GRAB_SUCESS:
{
TLidarScan lidar_scan = robotics_lidar.getLidarScan();
size_t lidar_scan_size = lidar_scan.getSize();
std::vector send_lidar_scan_data;
send_lidar_scan_data.resize(lidar_scan_size);
RslidarDataComplete one_lidar_data;
for(size_t i = 0; i < lidar_scan_size; i++)
{
one_lidar_data.signal = lidar_scan.signal[i];
one_lidar_data.angle = lidar_scan.angle[i];
one_lidar_data.distance = lidar_scan.distance[i];
send_lidar_scan_data[i] = one_lidar_data;
}
printf(“Lidar count %d!\n“ lidar_scan_size);
break;
}
case LIDAR_GRAB_ERRO:
{
break;
}
case LIDAR_GRAB_ELSE:
{
printf(“[Main] LIDAR_GRAB_ELSE!\n“);
break;
}
}
//usleep(50);
}
return 0;
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2018-12-06 02:18 Delta_2B_linux\
目录 0 2018-12-06 02:18 Delta_2B_linux\build\
目录 0 2018-12-06 02:18 Delta_2B_linux\build\CMakeFiles\
文件 45508 2018-12-06 02:18 Delta_2B_linux\build\CMakeFiles\CMakeOutput.log
目录 0 2018-12-06 02:18 Delta_2B_linux\build\CMakeFiles\3.10.2\
目录 0 2018-12-06 02:18 Delta_2B_linux\build\CMakeFiles\3.10.2\CompilerIdC\
目录 0 2018-12-06 02:18 Delta_2B_linux\build\CMakeFiles\3.10.2\CompilerIdC\tmp\
文件 18076 2018-12-06 02:18 Delta_2B_linux\build\CMakeFiles\3.10.2\CompilerIdC\CMakeCCompilerId.c
文件 8400 2018-12-06 02:18 Delta_2B_linux\build\CMakeFiles\3.10.2\CompilerIdC\a.out
文件 402 2018-12-06 02:18 Delta_2B_linux\build\CMakeFiles\3.10.2\CMakeSystem.cmake
目录 0 2018-12-06 02:18 Delta_2B_linux\build\CMakeFiles\3.10.2\CompilerIdCXX\
目录 0 2018-12-06 02:18 Delta_2B_linux\build\CMakeFiles\3.10.2\CompilerIdCXX\tmp\
文件 17631 2018-12-06 02:18 Delta_2B_linux\build\CMakeFiles\3.10.2\CompilerIdCXX\CMakeCXXCompilerId.cpp
文件 8408 2018-12-06 02:18 Delta_2B_linux\build\CMakeFiles\3.10.2\CompilerIdCXX\a.out
文件 2219 2018-12-06 02:18 Delta_2B_linux\build\CMakeFiles\3.10.2\CMakeCCompiler.cmake
文件 4849 2018-12-06 02:18 Delta_2B_linux\build\CMakeFiles\3.10.2\CMakeCXXCompiler.cmake
文件 8240 2018-12-06 02:18 Delta_2B_linux\build\CMakeFiles\3.10.2\CMakeDetermineCompilerABI_C.bin
文件 8256 2018-12-06 02:18 Delta_2B_linux\build\CMakeFiles\3.10.2\CMakeDetermineCompilerABI_CXX.bin
目录 0 2018-12-06 02:18 Delta_2B_linux\build\CMakeFiles\CMakeTmp\
文件 688 2018-12-06 02:18 Delta_2B_linux\build\CMakeFiles\feature_tests.c
文件 10011 2018-12-06 02:18 Delta_2B_linux\build\CMakeFiles\feature_tests.cxx
文件 85 2018-12-06 02:18 Delta_2B_linux\build\CMakeFiles\cmake.check_cache
目录 0 2018-12-06 02:18 Delta_2B_linux\build\CMakeFiles\delta_2b_lidar_node.dir\
文件 29394 2018-12-06 02:18 Delta_2B_linux\build\CMakeFiles\delta_2b_lidar_node.dir\build.make
文件 276 2018-12-06 02:18 Delta_2B_linux\build\CMakeFiles\delta_2b_lidar_node.dir\flags.make
目录 0 2018-12-06 02:18 Delta_2B_linux\build\CMakeFiles\delta_2b_lidar_node.dir\app\
文件 82480 2018-12-06 02:18 Delta_2B_linux\build\CMakeFiles\delta_2b_lidar_node.dir\app\node.cpp.o
目录 0 2018-12-06 02:18 Delta_2B_linux\build\CMakeFiles\delta_2b_lidar_node.dir\src\
目录 0 2018-12-06 02:18 Delta_2B_linux\build\CMakeFiles\delta_2b_lidar_node.dir\src\src\
文件 188072 2018-12-06 02:18 Delta_2B_linux\build\CMakeFiles\delta_2b_lidar_node.dir\src\src\C3iroboticsLidar.cpp.o
文件 1640 2018-12-06 02:18 Delta_2B_linux\build\CMakeFiles\delta_2b_lidar_node.dir\src\src\CArcTime.cpp.o
............此处省略57个文件信息
- 上一篇:usb基础知识及通讯协议
- 下一篇:socket编程常用API汇总
相关资源
- Microsoft Communications Control组件.zip
- ros的gazeon仿真文件
- Microsoft.DirectX.dll和Microsoft.DirectX.Dire
- Mikrotik 试玩脚本.zip
- Microsoft网络文件和打印机共享协议安
-
Microsoft visio 2010缺msxm
l 6.10.1129.0 - ros下usb摄像头视频发布
- Microsoft SDKs v6.0
- VS2010中添加Microsoft Communications Contro
- ros_qtc_plugin配置脚本
-
Microsoft .NET fr
amework 3.5完整离线安装 - Windows安装kerberos
- Rational Rose Enterprise 7.0破解文件(提供
- envi5.0插件modis插件modis_aerosol_inversio
- ROS中RVIZ工程包,配合Gazebo使用
- windows配置kerberos认证
- Hilditch、Pavlidis、Rosenfeld细化算法 、索
- Microsoft Visual Studio 2010 Uninstall Utility
- ros中文ssid生成器.exe
- ROS链接openni库测试代码
- ros单线固定IP 一分钟搞定
- atheros ar8171网卡驱动 CentOS6.4 已调通
- simatic ProSave_v14 sp1
- Microsoft_LoopBack_Adapter
- Pioneer 3多机器人控制ROS)
- ROS开源机器人控制基础-源程序-百度云
- ROS的indigo最新 smartcar代码
- ROS下同时存储Kinect 深度和RGB图 代码包
- probability-sheldon-ross-solution-manual.pdf
- ROS 6.x+7.x L6 授权
评论
共有 条评论