Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
wolf
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mobile_robotics
wolf_projects
wolf_lib
wolf
Commits
e15000f3
Commit
e15000f3
authored
10 years ago
by
acoromin
Browse files
Options
Downloads
Patches
Plain Diff
Added scilab file to prototype corner detection
parent
48e3099a
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/capture_laser_2D.cpp
+1
-7
1 addition, 7 deletions
src/capture_laser_2D.cpp
src/lineFit.sce
+36
-0
36 additions, 0 deletions
src/lineFit.sce
with
37 additions
and
7 deletions
src/capture_laser_2D.cpp
+
1
−
7
View file @
e15000f3
...
...
@@ -18,11 +18,5 @@ void CaptureLaser2D::processCapture()
void
CaptureLaser2D
::
extractCorners
()
{
std
::
cout
<<
"Extracting corners ... "
<<
std
::
endl
;
//TODO by Andreu: create class FeatureCorner2D + main to test this method.
//TODO by Juan AC
// Laser ranges are at data_
// Scan size is data_.size()
// Corners should be created as FeatureCorner2D. Corner 3 params to be stored at FeatureBase::measurement_
// After creation, they have to be pushed back to down_node_list_ by means of the method Capture::addFeature(const FeatureShPtr& _f_ptr)
}
This diff is collapsed.
Click to expand it.
src/lineFit.sce
0 → 100644
+
36
−
0
View file @
e15000f3
// clear all
xdel(winsid());
clear;
//invent a set of points + noise
points = [1 2 3 4 5 6;1 2 3 4 5 6];
points = points + rand(points,"normal")*0.01;
[xx N] = size(points);
//build the system : Ax=0. Matrix A = a_ij
a_00 = sum( points(1,:).^2 );
a_01 = sum( points(1,:).*points(2,:) );
a_02 = sum( points(1,:) );
a_10 = a_01;
a_11 = sum( points(2,:).^2 );
a_12 = sum( points(2,:) );
a_20 = a_02;
a_21 = a_12;
a_22 = N;
A = [a_00 a_01 a_02; a_10 a_11 a_12; a_20 a_21 a_22; 0 0 1];
//solve
line = pinv(A)*[zeros(3,1);1];
m = -line(1)/line(2);
xc = -line(3)/line(2);
disp("line: ");disp(line);
disp("m: ");disp(m);
disp("xc: ");disp(xc);
//plot
fig1 = figure(0);
fig1.background = 8;
plot(points(1,:),points(2,:),"g.");
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment