Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
segway_rmp_200
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
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
labrobotica
drivers
segway_rmp_200
Commits
e57c6a26
Commit
e57c6a26
authored
14 years ago
by
Joan Perez Ibarz
Browse files
Options
Downloads
Patches
Plain Diff
merging status msg branch to trunk
parent
fb96d48c
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/segway_rmp200.cpp
+27
-0
27 additions, 0 deletions
src/segway_rmp200.cpp
src/segway_rmp200.h
+46
-0
46 additions, 0 deletions
src/segway_rmp200.h
with
73 additions
and
0 deletions
src/segway_rmp200.cpp
+
27
−
0
View file @
e57c6a26
...
...
@@ -653,6 +653,33 @@ void CSegwayRMP200::reset_forward_integrator(void)
this
->
access_command
.
exit
();
}
TSegwayRMP200Status
CSegwayRMP200
::
get_status
(
void
)
{
TSegwayRMP200Status
status
;
status
.
right_wheel_velocity
=
right_wheel_velocity
;
status
.
left_wheel_velocity
=
left_wheel_velocity
;
status
.
pitch_angle
=
pitch_angle
;
status
.
pitch_rate
=
pitch_rate
;
status
.
roll_angle
=
roll_angle
;
status
.
roll_rate
=
roll_rate
;
status
.
yaw_rate
=
yaw_rate
;
status
.
left_wheel_displ
=
left_wheel_displ
;
status
.
right_wheel_displ
=
right_wheel_displ
;
status
.
forward_displ
=
forward_displ
;
status
.
yaw_displ
=
yaw_displ
;
status
.
servo_frames
=
servo_frames
;
status
.
left_torque
=
left_torque
;
status
.
right_torque
=
right_torque
;
status
.
ui_battery
=
ui_battery
;
status
.
powerbase_battery
=
powerbase_battery
;
op_mode
tractor
=
tractor
;
op_mode
hardware_mode
=
hardware_mode
;
gain
gain_schedule
=
gain_schedule
;
return
status
;
}
// status functions
float
CSegwayRMP200
::
get_pitch_angle
(
void
)
{
...
...
This diff is collapsed.
Click to expand it.
src/segway_rmp200.h
+
46
−
0
View file @
e57c6a26
...
...
@@ -60,6 +60,41 @@ typedef enum {light,tall,heavy} gain;
*/
typedef
enum
{
tractor
=
1
,
balance
=
2
,
power_down
=
3
}
op_mode
;
/**
* \brief structure of segway status
*
* This datatype holds the values of internal information retrieved from the
* hardware platform. It tries to give a general overview of what's happening
* in the platform in a given moment.
*/
struct
TSegwayRMP200Status
{
// Translational velocities
float
right_wheel_velocity
;
float
left_wheel_velocity
;
// Angular rates and angles
float
pitch_angle
;
float
pitch_rate
;
float
roll_angle
;
float
roll_rate
;
float
yaw_rate
;
// Displacements
float
left_wheel_displ
;
float
right_wheel_displ
;
float
forward_displ
;
float
yaw_displ
;
// Other configurations
float
servo_frames
;
float
left_torque
;
float
right_torque
;
float
ui_battery
;
float
powerbase_battery
;
op_mode
tractor
;
op_mode
hardware_mode
;
gain
gain_schedule
;
};
/**
* \brief Segway RMP 200 driver
*
...
...
@@ -1078,6 +1113,17 @@ class CSegwayRMP200
*/
void
connect
(
const
std
::
string
&
desc_serial
=
""
);
// status functions
/**
* \brief function to return the whole platform status
*
* This function returns the raw data status of all internal measures from
* the platform.
*
* \return struct with all data from platform sensors
*/
TSegwayRMP200Status
get_status
(
void
);
/**
* \brief function to return the pitch angle
*
...
...
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