Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dynamixel_motor_cont
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
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
labrobotica
drivers
dynamixel_motor_cont
Commits
fc10a2e7
Commit
fc10a2e7
authored
10 years ago
by
Sergi Hernandez
Browse files
Options
Downloads
Patches
Plain Diff
Disabled the servos when changing the control mode to avoid erratic motions.
parent
0a05031c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/dynamixel_motor.cpp
+9
-8
9 additions, 8 deletions
src/dynamixel_motor.cpp
src/dynamixel_motor_group.cpp
+1
-0
1 addition, 0 deletions
src/dynamixel_motor_group.cpp
with
10 additions
and
8 deletions
src/dynamixel_motor.cpp
+
9
−
8
View file @
fc10a2e7
...
...
@@ -329,15 +329,16 @@ void CDynamixelMotor::set_control_mode(control_mode mode)
else
{
try
{
if
(
this
->
info
.
model
==
"XL_320"
)
if
(
this
->
mode
!=
mode
)
{
this
->
dynamixel_dev
->
write_byte_register
(
this
->
registers
[
dyn_control_mode
],(
unsigned
char
)
mode
);
usleep
(
10000
);
this
->
mode
=
mode
;
}
else
{
if
(
this
->
mode
!=
mode
)
this
->
disable
();
if
(
this
->
info
.
model
==
"XL_320"
)
{
this
->
dynamixel_dev
->
write_byte_register
(
this
->
registers
[
dyn_control_mode
],(
unsigned
char
)
mode
);
usleep
(
10000
);
this
->
mode
=
mode
;
}
else
{
if
(
mode
==
angle_ctrl
)
{
...
...
This diff is collapsed.
Click to expand it.
src/dynamixel_motor_group.cpp
+
1
−
0
View file @
fc10a2e7
...
...
@@ -840,6 +840,7 @@ void CDynamixelMotorGroup::set_control_mode(control_mode mode)
if
(
this
->
mode
!=
mode
)
{
this
->
disable
();
for
(
i
=
0
;
i
<
this
->
servo_id
.
size
();
i
++
)
{
try
{
...
...
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