Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
humanoid_common
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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
humanoides
humanoid_common
Commits
f27e081d
Commit
f27e081d
authored
8 years ago
by
Irene Garcia Camacho
Browse files
Options
Downloads
Patches
Plain Diff
Minor changes in joints module
parent
60d19e5c
No related branches found
No related tags found
1 merge request
!4
Filtered localization
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
humanoid_modules/include/humanoid_modules/joints_module.h
+1
-1
1 addition, 1 deletion
humanoid_modules/include/humanoid_modules/joints_module.h
humanoid_modules/src/joints_module.cpp
+2
-13
2 additions, 13 deletions
humanoid_modules/src/joints_module.cpp
with
3 additions
and
14 deletions
humanoid_modules/include/humanoid_modules/joints_module.h
+
1
−
1
View file @
f27e081d
...
...
@@ -43,7 +43,7 @@ class CJointsModule : public CHumanoidModule<joints_module::JointsModuleConfig>
CJointsModule
(
const
std
::
string
&
name
);
/* control functions */
//execute joints trajectory of a vector of servos id
bool
execute
(
std
::
vector
<
unsigned
int
>
&
servos_id
,
std
::
vector
<
double
>
&
angles
,
std
::
vector
<
double
>
&
speeds
,
const
std
::
vector
<
double
>
&
accels
=
std
::
vector
<
double
>
());
void
execute
(
std
::
vector
<
unsigned
int
>
&
servos_id
,
std
::
vector
<
double
>
&
angles
,
std
::
vector
<
double
>
&
speeds
,
const
std
::
vector
<
double
>
&
accels
=
std
::
vector
<
double
>
());
//Add servo goal
void
add_goal
(
unsigned
int
servo_id
,
double
angle
,
double
speed
,
double
acceleration
);
//Execute action with servos added (add_servo)
...
...
This diff is collapsed.
Click to expand it.
humanoid_modules/src/joints_module.cpp
+
2
−
13
View file @
f27e081d
...
...
@@ -2,9 +2,6 @@
#define SERVO_ACCEL 0.3
/**
* cambiar funcion is-finished para que tmb tenga en cuenta el flag new_trajectory
*/
CJointsModule
::
CJointsModule
(
const
std
::
string
&
name
)
:
CHumanoidModule
(
name
,
JOINTS_MODULE
),
joints_trajectory
(
"joint_trajectory_action"
,
name
)
{
...
...
@@ -134,7 +131,7 @@ void CJointsModule::reconfigure_callback(joints_module::JointsModuleConfig &conf
this
->
unlock
();
}
bool
CJointsModule
::
execute
(
std
::
vector
<
unsigned
int
>
&
servos_id
,
std
::
vector
<
double
>
&
angles
,
std
::
vector
<
double
>
&
speeds
,
const
std
::
vector
<
double
>
&
accels
)
void
CJointsModule
::
execute
(
std
::
vector
<
unsigned
int
>
&
servos_id
,
std
::
vector
<
double
>
&
angles
,
std
::
vector
<
double
>
&
speeds
,
const
std
::
vector
<
double
>
&
accels
)
{
unsigned
int
i
,
j
;
bool
servo_ok
=
true
;
...
...
@@ -142,13 +139,6 @@ bool CJointsModule::execute(std::vector<unsigned int> &servos_id, std::vector<do
this
->
lock
();
if
(
this
->
state
==
JOINTS_MODULE_IDLE
)
// trajectory is in progres
{
/*Clear goal*/
/* goal.trajectory.joint_names.clear();
goal.trajectory.points[0].positions.clear();
goal.trajectory.points[0].velocities.clear();
goal.trajectory.points[0].accelerations.clear()*/
;
/* clear vector */
// servos_name.clear();
if
(
accels
.
size
()
>
0
)
{
...
...
@@ -197,8 +187,7 @@ bool CJointsModule::execute(std::vector<unsigned int> &servos_id, std::vector<do
this
->
new_trajectory
=
true
;
}
this
->
unlock
();
return
true
;
}
void
CJointsModule
::
execute_goal
(
void
)
...
...
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