Slamtec Slamware · PDF file您的计算机应当安装Visual Studio 2010...
-
Upload
dangkhuong -
Category
Documents
-
view
309 -
download
9
Transcript of Slamtec Slamware · PDF file您的计算机应当安装Visual Studio 2010...
Slamtec Slamware SDK
API
Copyright 2009-2016 Shanghai Slamtec Co., Ltd.
http://www.RoboPeak.com
2015-12-30
Rev. 1.1
1 / 51
Slamtec Slamware SDP
API
rev. 1.1
Copyright 2009-2016 Slamtec
http://www.RoboPeak.com
1. SDK .................................................................................................... 3
.......................................................................................................... 3
....................................................................................................... 3
2. ............................................................................................. 4
3. ............................................................................................. 5
.......................................................................................................... 5
................................................................................................... 7
Hello World ..................................................................................................... 9
4. API ................................................................................................... 11
................................................................................................................ 11
rpos::core::Location ................................................................................ 11
rpos::core::Rotation ................................................................................ 13
rpos::core::Pose ....................................................................................... 14
rpos::core::Action .................................................................................... 16
rpos::core::ActionStatus ...................................................................... 18
rpos::core::Feature .................................................................................. 19
rpos::core::RectangleF ........................................................................... 19
rpos::core::Vector2f ................................................................................ 22
rpos::core::Vector2i ................................................................................. 23
rpos::core::LaserPoint .............................................................................. 23
rpos::core::RobotPlatform ...................................................................... 25
rpos::actions::MoveAction ..................................................................... 25
2 / 51
Slamtec Slamware SDP
API
rev. 1.1
Copyright 2009-2016 Slamtec
http://www.RoboPeak.com
rpos::features::ArtifactProvider .............................................................. 27
rpos::features::LocationProvider ............................................................ 28
rpos::features::MotionPlanner ................................................................ 30
rpos::features::SweepMotionPlanner .................................................... 33
rpos::features::SystemResource ............................................................. 34
rpos::features::location_provider::Map ................................................ 35
rpos::features::location_provider::MapType ..................................... 37
rpos::features::location_provider::BitmapMap .................................... 37
rpos::features::location_provider::BitmapMapPixelFormat ............. 39
rpos::features::motion_planner::Path .................................................... 39
rpos::features::system_resource::LaserScan ......................................... 40
rpos::robot_platforms::SlamwareCorePlatform .................................... 41
5. .................................................................................................. 51
3 / 51
Slamtec Slamware SDP
API
rev. 1.1
Copyright 2009-2016 Slamtec
http://www.RoboPeak.com
1. SDK
Slamware SDK
bin
include SDK
lib
samples
workspaces
Table 1 SDK
include Slamware SDK
boost Boost 1.53.0
Eigen Eigen
rpos Slamware SDK
Table 2
4 / 51
Slamtec Slamware SDP
API
rev. 1.1
Copyright 2009-2016 Slamtec
http://www.RoboPeak.com
2.
Slamware SDK
Visual Studio 2010 SP1 Visual
Studio 2010 SP1 Visual Studio 2012 2013
5 / 51
Slamtec Slamware SDP
API
rev. 1.1
Copyright 2009-2016 Slamtec
http://www.RoboPeak.com
3.
1 Visual Studio 2010
Figure 1
Visual C++ Win32 Console ApplicationWin32
Name
OK
6 / 51
Slamtec Slamware SDP
API
rev. 1.1
Copyright 2009-2016 Slamtec
http://www.RoboPeak.com
2
Figure 2
Next
Figure 3
Application Type Console Application
Additional options Empty Project
Finish
7 / 51
Slamtec Slamware SDP
API
rev. 1.1
Copyright 2009-2016 Slamtec
http://www.RoboPeak.com
1
Solution Explorer Properties
Figure 4
2 VC++
VC++ DirectoriesVC++
Figure 5 VC++
Include Directories
8 / 51
Slamtec Slamware SDP
API
rev. 1.1
Copyright 2009-2016 Slamtec
http://www.RoboPeak.com
SDK include
Figure 6
Library Directories
SDK lib
Figure 7
9 / 51
Slamtec Slamware SDP
API
rev. 1.1
Copyright 2009-2016 Slamtec
http://www.RoboPeak.com
Figure 8
OK
Hello World
1
Solution Explorer Source Files Add
->New Item
10 / 51
Slamtec Slamware SDP
API
rev. 1.1
Copyright 2009-2016 Slamtec
http://www.RoboPeak.com
Figure 9
C++ File (.cpp) main.cpp
2
#include
#include
using namespace std;
using namespace rpos::robot_platforms;
int main(int argc, char* argv[])
{
SlamwareCorePlatform platform =
SlamwareCorePlatform::connect("192.168.111.1", 1445);
cout
11 / 51
Slamtec Slamware SDP
API
rev. 1.1
Copyright 2009-2016 Slamtec
http://www.RoboPeak.com
4. API
rpos::core::Location
rpos::core::Rotation
rpos::core::Pose
rpos::core::Action
rpos::core::ActionStatus
rpos::core::Feature
rpos::core::RectangleF float
rpos::core::Vector2f float
rpos::core::Vector2i int
rpos::core::LaserPoint
rpos::core::RobotPlatform
rpos::actions::MoveAction
rpos::features::ArtifactProvider
rpos::features::LocationProvider
rpos::features::MotionPlanner
rpos::features::SweepMotionPlanner
rpos::features::SystemResource
rpos::features::location_provider::Map
rpos::features::location_provider::MapType
rpos::features::location_provider::BitmapMap
rpos::features::location_provider::BitmapMapPixelFormat
rpos::features::motion_planner::Path
rpos::features::system_resource::LaserScan
rpos::robot_platforms::SlamwareCorePlatform Slamware CORE
Table 3 API
rpos::core::Location
Location xyz
rpos/core/pose.h
12 / 51
Slamtec Slamware SDP
API
rev. 1.1
Copyright 2009-2016 Slamtec
http://www.RoboPeak.com
Location()
Location(double x, double y, double z)
Location(const Location&)
Location& operator=(const Location&)
double x() const
double& x()
double y() const
double& y()
double z() const
double& z()
Location()
Location xyz 0
Location(double x, double y, double z)
Location xyz
Location(const Location&)
Location& operator=(const Location&)
double x() constdouble& x()
x
Location location;
std::cout
13 / 51
Slamtec Slamware SDP
API
rev. 1.1
Copyright 2009-2016 Slamtec
http://www.RoboPeak.com
x
double z() constdouble& z()
z
x
rpos::core::Rotation
Rotation Rotation
rpos/core/pose.h
Rotation()
Rotation(double yaw, double pitch, double roll)
Rotation(const Rotation&)
Rotation& operator=(const Rotation&)
double yaw() const
double& yaw()
double pitch() const
double& pitch()
double roll() const
double& roll()
Rotation()
Rotation yawpitchroll 0
Rotation(double yaw, double pitch, double roll)
Rotation yawpitchroll
Rotation(const Rotation&)
14 / 51
Slamtec Slamware SDP
API
rev. 1.1
Copyright 2009-2016 Slamtec
http://www.RoboPeak.com
Rotation& operator=(const Rotation&)
double yaw() constdouble& yaw()
Tait-Bryan angles
http://en.wikipedia.org/wiki/Euler_angles#Tait.E2.80.93Bryan_angles
Location::x()
double pitch() constdouble& pitch()
double roll() const, double& roll()
rpos