Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
dynamic_graph_bridge
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
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
Stack Of Tasks
dynamic_graph_bridge
Commits
b5ea3589
Commit
b5ea3589
authored
7 years ago
by
Olivier Stasse
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of
https://github.com/stack-of-tasks/dynamic_graph_bridge
into devel
parents
7ac28914
72300c0c
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
CMakeLists.txt
+2
-1
2 additions, 1 deletion
CMakeLists.txt
src/sot_loader.cpp
+8
-3
8 additions, 3 deletions
src/sot_loader.cpp
with
10 additions
and
4 deletions
CMakeLists.txt
+
2
−
1
View file @
b5ea3589
...
@@ -136,6 +136,7 @@ compile_plugin(ros_time)
...
@@ -136,6 +136,7 @@ compile_plugin(ros_time)
compile_plugin
(
ros_joint_state
)
compile_plugin
(
ros_joint_state
)
target_link_libraries
(
ros_joint_state
"
${
DYNAMIC_GRAPH_PLUGINDIR
}
/dp-dynamic.so"
)
target_link_libraries
(
ros_joint_state
"
${
DYNAMIC_GRAPH_PLUGINDIR
}
/dp-dynamic.so"
)
target_link_libraries
(
ros_publish ros_bridge
)
#compile_plugin(robot_model)
#compile_plugin(robot_model)
...
@@ -173,7 +174,7 @@ target_link_libraries(geometric_simu ros_bridge tf ${Boost_LIBRARIES} ${CMAKE_D
...
@@ -173,7 +174,7 @@ target_link_libraries(geometric_simu ros_bridge tf ${Boost_LIBRARIES} ${CMAKE_D
add_library
(
sot_loader src/sot_loader.cpp src/sot_loader_basic.cpp
)
add_library
(
sot_loader src/sot_loader.cpp src/sot_loader_basic.cpp
)
pkg_config_use_dependency
(
sot_loader dynamic-graph
)
pkg_config_use_dependency
(
sot_loader dynamic-graph
)
pkg_config_use_dependency
(
sot_loader sot-core
)
pkg_config_use_dependency
(
sot_loader sot-core
)
target_link_libraries
(
sot_loader
${
Boost_LIBRARIES
}
roscpp ros_bridge
)
target_link_libraries
(
sot_loader
${
Boost_LIBRARIES
}
roscpp ros_bridge
tf
)
install
(
TARGETS sot_loader DESTINATION lib
)
install
(
TARGETS sot_loader DESTINATION lib
)
add_subdirectory
(
src
)
add_subdirectory
(
src
)
...
...
This diff is collapsed.
Click to expand it.
src/sot_loader.cpp
+
8
−
3
View file @
b5ea3589
...
@@ -76,15 +76,20 @@ void SotLoader::startControlLoop()
...
@@ -76,15 +76,20 @@ void SotLoader::startControlLoop()
void
SotLoader
::
initializeRosNode
(
int
argc
,
char
*
argv
[])
void
SotLoader
::
initializeRosNode
(
int
argc
,
char
*
argv
[])
{
{
SotLoaderBasic
::
initializeRosNode
(
argc
,
argv
);
SotLoaderBasic
::
initializeRosNode
(
argc
,
argv
);
angleEncoder_
.
resize
(
nbOfJoints_
);
//Temporary fix. TODO: where should nbOfJoints_ be initialized from?
if
(
ros
::
param
::
has
(
"/sot/state_vector_map"
))
{
angleEncoder_
.
resize
(
nbOfJoints_
);
}
startControlLoop
();
startControlLoop
();
}
}
void
void
SotLoader
::
fillSensors
(
map
<
string
,
dgs
::
SensorValues
>
&
sensorsIn
)
SotLoader
::
fillSensors
(
map
<
string
,
dgs
::
SensorValues
>
&
sensorsIn
)
{
{
// Update joint values.w
// Update joint values.w
assert
(
angleControl_
.
size
()
==
angleEncoder_
.
size
());
sensorsIn
[
"joints"
].
setName
(
"angle"
);
sensorsIn
[
"joints"
].
setName
(
"angle"
);
for
(
unsigned
int
i
=
0
;
i
<
angleControl_
.
size
();
i
++
)
for
(
unsigned
int
i
=
0
;
i
<
angleControl_
.
size
();
i
++
)
angleEncoder_
[
i
]
=
angleControl_
[
i
];
angleEncoder_
[
i
]
=
angleControl_
[
i
];
...
@@ -97,7 +102,7 @@ SotLoader::readControl(map<string,dgs::ControlValues> &controlValues)
...
@@ -97,7 +102,7 @@ SotLoader::readControl(map<string,dgs::ControlValues> &controlValues)
// Update joint values.
// Update joint values.
angleControl_
=
controlValues
[
"
joints
"
].
getValues
();
angleControl_
=
controlValues
[
"
control
"
].
getValues
();
//Debug
//Debug
std
::
map
<
std
::
string
,
dgs
::
ControlValues
>::
iterator
it
=
controlValues
.
begin
();
std
::
map
<
std
::
string
,
dgs
::
ControlValues
>::
iterator
it
=
controlValues
.
begin
();
...
...
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