Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Hideaki Tai
/
omni_main
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
49e5899d
authored
Dec 18, 2018
by
Hideaki Tai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix : speed cmd / response confirmation OK
parent
625102d3
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
5 deletions
+21
-5
lib/Whill/OmniModel.h
+3
-3
lib/Whill/Whill.cpp
+18
-2
No files found.
lib/Whill/OmniModel.h
View file @
49e5899d
...
@@ -21,7 +21,7 @@ namespace Work
...
@@ -21,7 +21,7 @@ namespace Work
const
double
g
=
9
.
80665
;
// gravitational acceleraation [m/s^2]
const
double
g
=
9
.
80665
;
// gravitational acceleraation [m/s^2]
const
double
R
=
0
.
12
;
// wheel radius [m]
const
double
R
=
0
.
12
5
;
// wheel radius [m]
// const double W = 0.2; // wheel base / 2.0 [m] (from center to wheel)
// const double W = 0.2; // wheel base / 2.0 [m] (from center to wheel)
const
double
L
=
0
.
435
;
// from center to wheel [m]
const
double
L
=
0
.
435
;
// from center to wheel [m]
// const double T = 0.29; // tread / 2.0 [m] (from center to wheel)
// const double T = 0.29; // tread / 2.0 [m] (from center to wheel)
...
@@ -158,8 +158,8 @@ namespace Work
...
@@ -158,8 +158,8 @@ namespace Work
// const double& getWheelBase() const { return W; }
// const double& getWheelBase() const { return W; }
// const double& getTread() const { return T; }
// const double& getTread() const { return T; }
double
getWheelRadius
()
const
{
return
R
/
2
.
0
;
}
double
getWheelRadius
()
const
{
return
R
;
}
const
double
&
getWheelDiameter
()
const
{
return
R
;
}
const
double
&
getWheelDiameter
()
const
{
return
2
.
0
*
R
;
}
const
double
&
getWheelThickness
()
const
{
return
wheel_thickness
;
}
const
double
&
getWheelThickness
()
const
{
return
wheel_thickness
;
}
};
};
...
...
lib/Whill/Whill.cpp
View file @
49e5899d
...
@@ -49,6 +49,16 @@ bool WhillModelC::moveVel(float y, float x) // [m/s]
...
@@ -49,6 +49,16 @@ bool WhillModelC::moveVel(float y, float x) // [m/s]
{
{
float
fb
,
lr
;
float
fb
,
lr
;
// Serial.print("vel cmd [m/s] (y, x) = ");
// Serial.print(y);
// Serial.print(", ");
// Serial.println(x);
// Serial.print("spd prf [m/s] (y, x) = ");
// Serial.print(spd_profile.f_m1);
// Serial.print(", ");
// Serial.println(spd_profile.t_m1);
fb
=
y
/
spd_profile
.
f_m1
*
100.
f
;
fb
=
y
/
spd_profile
.
f_m1
*
100.
f
;
lr
=
x
/
spd_profile
.
t_m1
*
100.
f
;
lr
=
x
/
spd_profile
.
t_m1
*
100.
f
;
...
@@ -171,12 +181,18 @@ void WhillModelC::parse()
...
@@ -171,12 +181,18 @@ void WhillModelC::parse()
status
.
info
.
error_code
=
unpacker
.
errorCode
();
status
.
info
.
error_code
=
unpacker
.
errorCode
();
// Serial.print("Wheel Spd = ");
// Serial.println("=================================");
// Serial.print("Detected Wheel Spd [km/h] = ");
// Serial.print(status.info.wheel.speed_l);
// Serial.print(status.info.wheel.speed_l);
// Serial.print(", ");
// Serial.print(", ");
// Serial.print(status.info.wheel.speed_r);
// Serial.print(status.info.wheel.speed_r);
// Serial.println();
// Serial.println();
// Serial.print("Detected Wheel Anguler Spd[rad/s] = ");
// Serial.print(status.info.wheel.speed_l * 1000. / 60. /60. / 0.125);
// Serial.print(", ");
// Serial.print(status.info.wheel.speed_r * 1000. / 60. /60. / 0.125);
// Serial.println();
// Serial.println("=================================");
}
}
pop
();
pop
();
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment