-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #32 from anindex/master
hokuyoComp documentations
- Loading branch information
Showing
5 changed files
with
1,624 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,85 @@ | ||
|
||
# hokuyo | ||
|
||
Hokuyo laser sensor family is a low-cost laser sensor applied in many areas in robotics research such as navigation, etc. It provides range data in short distance from 0.4~5 meters for basic localization or SLAM task in small indoor environment. | ||
|
||
The hokuyoComp component provides a wrapper for accessing data from [Hokuyo c_urg library](https://debian.pkgs.org/8/debian-main-amd64/liburg0-dev_0.8.18-2_amd64.deb.html) and serves the laser measurements over RoboComp environment using Ice middleware framework. The component uses `Laser.idsl` interface. Briefly, `Laser.idsl` interface provides method template `getLaserData()` to return laser measurements as type `TLaserData` and method `getLaserConfData()` to return specific laser configurations as type `LaserConfData`. | ||
|
||
## Resolve dependencies | ||
This section assumes user has already installed RoboComp core library and pull Robolab's components according to this [README guide](https://github.com/robocomp/robocomp). | ||
|
||
Before compiling the component, we must first resolve its dependencies which are the Hokuyo driver packages: | ||
|
||
**For Ubuntu 14.04 Trusty Tahr** | ||
|
||
``` | ||
sudo apt-get install -y liburg0-dev | ||
``` | ||
|
||
**For Ubuntu 16.04 Xenial Xerus onward** | ||
|
||
Because `liburg0-dev` package does not exist in official PPA from Ubuntu 16.04 onward, we should download deb package directly from Trusty repo and install it by `dpkg`. | ||
|
||
``` | ||
# | ||
``` hokuyo | ||
sudo apt install -y libc6 libgcc1 libsdl-net1.2 libstdc++6 libsdl1.2debian | ||
cd ~/Downloads | ||
wget http://ftp.br.debian.org/debian/pool/main/u/urg/liburg0_0.8.18-2_amd64.deb | ||
wget http://ftp.br.debian.org/debian/pool/main/u/urg/liburg0-dev_0.8.18-2_amd64.deb | ||
sudo dpkg -i liburg0_0.8.18-2_amd64.deb liburg0-dev_0.8.18-2_amd64.deb | ||
``` | ||
Intro to component here | ||
|
||
Then we can compile the `hokuyoComp` component: | ||
``` | ||
cd ~/robocomp/components/robocomp-robolab/components/hokuyoComp/ | ||
cmake . | ||
make | ||
``` | ||
|
||
## Configuration parameters | ||
As any other component, | ||
``` *hokuyo* ``` | ||
needs a configuration file to start. In | ||
According to `Laser.idsl` interface, Hokuyo specific parameters are characterized as the config file described below: | ||
|
||
etc/config | ||
``` | ||
CommonBehavior.Endpoints=tcp -p 10000 | ||
you can find an example of a configuration file. We can find there the following lines: | ||
EXAMPLE HERE | ||
# Endpoints for implemented interfaces | ||
Laser.Endpoints=tcp -p 10003 | ||
|
||
## Starting the component | ||
To avoid changing the *config* file in the repository, we can copy it to the component's home directory, so changes will remain untouched by future git pulls: | ||
# Hokuyo sensor specific parameters | ||
Laser.Driver=HokuyoURG | ||
Laser.Device=/dev/ttyACM0 | ||
Laser.StartValue=0 | ||
Laser.EndValue=768 | ||
Laser.SkipValue=1 | ||
Laser.SampleRate=100 | ||
Laser.angleRes=0.00613593 | ||
Laser.angleIni=-2.356197 | ||
Laser.Cluster=1 | ||
Laser.minRange=40 | ||
Laser.maxRange=4094 | ||
Laser.TalkToBase=false | ||
Laser.maxDegrees=240 | ||
Laser.staticConf=1 | ||
cd | ||
``` <hokuyo 's path> ``` | ||
Ice.Warn.Connections=0 | ||
Ice.Trace.Network=0 | ||
Ice.Trace.Protocol=0 | ||
Ice.ACM.Client=10 | ||
Ice.ACM.Server=10 | ||
``` | ||
|
||
cp etc/config config | ||
|
||
After editing the new config file we can run the component: | ||
Note that the `Laser.Driver` and `Laser.Device` parameters can be different depended on your Hokuyo device name and current port that the sensor is connected to. For checking every USB ports that have been connected: | ||
``` | ||
ls /dev/ttyACM* | ||
``` | ||
then user should be able to find the corresponding port that Hokuyo sensor is connected to. Regarding configuring Hokuyo hardware specific parameters, user should refer to this [link](https://devel.iri.upc.edu/docs/labrobotica/hokuyo_laser_2d/laser_specs.html). | ||
|
||
bin/ | ||
## Starting the component | ||
After editing config file for matching with Hokuyo device name and desired parameters of your laser sensor, we plug the Hokuyo sensor in any USB port and start the component using these commands: | ||
|
||
```hokuyo ``` | ||
``` | ||
./bin/hokuyo --Ice.Config=config | ||
``` | ||
|
||
--Ice.Config=config | ||
## Known issues |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
CommonBehavior.Endpoints=tcp -p 10000 | ||
|
||
|
||
# Endpoints for implemented interfaces | ||
Laser.Endpoints=tcp -p 10003 | ||
|
||
# Hokuyo sensor specific parameters | ||
Laser.Driver=HokuyoURG | ||
Laser.Device=/dev/ttyACM0 | ||
Laser.StartValue=0 | ||
Laser.EndValue=768 | ||
Laser.SkipValue=1 | ||
Laser.SampleRate=100 | ||
Laser.angleRes=0.00613593 | ||
Laser.angleIni=-2.356197 | ||
Laser.Cluster=1 | ||
Laser.minRange=40 | ||
Laser.maxRange=4094 | ||
Laser.TalkToBase=false | ||
Laser.maxDegrees=240 | ||
Laser.staticConf=1 | ||
|
||
|
||
Ice.Warn.Connections=0 | ||
Ice.Trace.Network=0 | ||
Ice.Trace.Protocol=0 | ||
Ice.ACM.Client=10 | ||
Ice.ACM.Server=10 |
Oops, something went wrong.