Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
E
extctrl2014
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
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Anders Blomdell
extctrl2014
Commits
61a401a8
Commit
61a401a8
authored
9 years ago
by
Anders Blomdell
Browse files
Options
Downloads
Patches
Plain Diff
Before implementing transmit retries
parent
ee967b18
No related branches found
No related tags found
No related merge requests found
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
mc/Makefile
+25
-6
25 additions, 6 deletions
mc/Makefile
mc/extctrl_pub.irc5_main_110310.h
+98
-0
98 additions, 0 deletions
mc/extctrl_pub.irc5_main_110310.h
mc/hijacknet_extctrl2014.c
+1318
-0
1318 additions, 0 deletions
mc/hijacknet_extctrl2014.c
with
1441 additions
and
6 deletions
mc/Makefile
+
25
−
6
View file @
61a401a8
...
@@ -5,7 +5,8 @@ TARGETS=lth_fixes.mc \
...
@@ -5,7 +5,8 @@ TARGETS=lth_fixes.mc \
hijacknet_lth_net.mc
\
hijacknet_lth_net.mc
\
fei82557End.mc
\
fei82557End.mc
\
hijacknet_test.mc
\
hijacknet_test.mc
\
extctrl2014_lc.mc
extctrl2014_lc.mc
\
hijacknet_extctrl2014.mc
AUTO_GEN
=
extctrl2014_lc.c
\
AUTO_GEN
=
extctrl2014_lc.c
\
extctrl2014_lc.h
\
extctrl2014_lc.h
\
mc.globalize.c
mc.globalize.c
...
@@ -19,6 +20,10 @@ EXTRA_CFLAGS_hijacknet_lth_net=-I/opt/robot/include
...
@@ -19,6 +20,10 @@ EXTRA_CFLAGS_hijacknet_lth_net=-I/opt/robot/include
EXTRA_CFLAGS_fei82557End
=
-Wno-error
-Wno-all
-Wno-endif-labels
EXTRA_CFLAGS_fei82557End
=
-Wno-error
-Wno-all
-Wno-endif-labels
EXTRA_CFLAGS_extctrl2014_lc
=
-I
/usr/include/labcomm
\
EXTRA_CFLAGS_extctrl2014_lc
=
-I
/usr/include/labcomm
\
-DLABCOMM_COMPAT
=
"<labcomm_compat.h>"
-DLABCOMM_COMPAT
=
"<labcomm_compat.h>"
EXTRA_CFLAGS_hijacknet_extctrl2014
=
-I
/usr/include/labcomm
\
-DLABCOMM_COMPAT
=
"<labcomm_compat.h>"
EXTRA_LDFLAGS_hijacknet_extctrl2014
=
extctrl2014_lc.mc
-Wl
,-r,-llabcomm2014
HIDE_hijacknet_extctrl2014
=
labcomm2014_
ROBOT
=
ROBOT
=
ROBOTWARE
=
$(
shell
[
-n
"
$(
ROBOT
)
"
]
&&
\
ROBOTWARE
=
$(
shell
[
-n
"
$(
ROBOT
)
"
]
&&
\
../tools/abb_extctrl_setup.py
--robot
"
$(
ROBOT
)
"
--robotware
)
../tools/abb_extctrl_setup.py
--robot
"
$(
ROBOT
)
"
--robotware
)
...
@@ -32,7 +37,7 @@ all: $(TARGETS)
...
@@ -32,7 +37,7 @@ all: $(TARGETS)
mc_test_load
:
hijack_fei.mc.load spray_test.mc.load
mc_test_load
:
hijack_fei.mc.load spray_test.mc.load
%.mc
:
%.mc.c
%.mc
:
%.mc.c
Makefile
WIND_BASE
=
/opt/robot/include/vxworks/5.5.1/
\
WIND_BASE
=
/opt/robot/include/vxworks/5.5.1/
\
i586-wrs-vxworks-gcc
\
i586-wrs-vxworks-gcc
\
-O3
-Wall
-Wno-unused-but-set-variable
-Werror
\
-O3
-Wall
-Wno-unused-but-set-variable
-Werror
\
...
@@ -44,9 +49,9 @@ mc_test_load: hijack_fei.mc.load spray_test.mc.load
...
@@ -44,9 +49,9 @@ mc_test_load: hijack_fei.mc.load spray_test.mc.load
-I
.
\
-I
.
\
-I
../common
\
-I
../common
\
-o
$@
\
-o
$@
\
-c
$<
$<
$(
EXTRA_LDFLAGS_
$*
)
%.mc
:
%.c
%.mc
:
%.c
Makefile
WIND_BASE
=
/opt/robot/include/vxworks/5.5.1/
\
WIND_BASE
=
/opt/robot/include/vxworks/5.5.1/
\
i586-wrs-vxworks-gcc
\
i586-wrs-vxworks-gcc
\
-O3
-Wall
-Wno-unused-but-set-variable
-Werror
\
-O3
-Wall
-Wno-unused-but-set-variable
-Werror
\
...
@@ -56,7 +61,14 @@ mc_test_load: hijack_fei.mc.load spray_test.mc.load
...
@@ -56,7 +61,14 @@ mc_test_load: hijack_fei.mc.load spray_test.mc.load
-I
.
\
-I
.
\
-I
../common
\
-I
../common
\
-o
$@
\
-o
$@
\
-c
$<
$<
$(
EXTRA_LDFLAGS_
$*
)
for
h
in
$(
HIDE_
$*
)
;
do
\
nm
$@
|
sed
-e
"s/.*[DTB]
\(
$$
h.*
\)
/
\1
/gp;d"
>
$@
.hide
||
exit
1
;
\
echo
"Hiding:
$$
h (
$$(
cat
$@
.hide | wc -l
)
symbols)"
;
\
i586-wrs-vxworks-objcopy
--localize-symbols
=
$@
.hide
$@
$@
.tmp
&&
\
mv
$@
.tmp
$@
||
echo
"Hiding failed for
$$
h"
||
exit
1
;
\
rm
$@
.hide
;
\
done
%_lc.c %_lc.h
:
%.lc
%_lc.c %_lc.h
:
%.lc
labcomm2014
--c
=
$*
_lc.c
--h
=
$*
_lc.h
$<
labcomm2014
--c
=
$*
_lc.c
--h
=
$*
_lc.h
$<
...
@@ -92,7 +104,10 @@ host_commands:
...
@@ -92,7 +104,10 @@ host_commands:
@
echo
"ncftpput -uu -pp
$(
ROBOT
)
/hd0a/
$(
DESTDIR
)
hijacknet_hpnet.mc"
@
echo
"ncftpput -uu -pp
$(
ROBOT
)
/hd0a/
$(
DESTDIR
)
hijacknet_hpnet.mc"
@
echo
"ncftpput -uu -pp
$(
ROBOT
)
/hd0a/
$(
DESTDIR
)
hijacknet_fei.mc"
@
echo
"ncftpput -uu -pp
$(
ROBOT
)
/hd0a/
$(
DESTDIR
)
hijacknet_fei.mc"
@
echo
"ncftpput -uu -pp
$(
ROBOT
)
/hd0a/
$(
DESTDIR
)
hijacknet.mc"
@
echo
"ncftpput -uu -pp
$(
ROBOT
)
/hd0a/
$(
DESTDIR
)
hijacknet.mc"
@
echo
@
echo
"ncftpput -uu -pp
$(
ROBOT
)
/hd0a/
$(
DESTDIR
)
hijacknet_test.mc"
@
echo
"ncftpput -uu -pp
$(
ROBOT
)
/hd0a/
$(
DESTDIR
)
hijacknet_test.mc"
@
echo
@
echo
"ncftpput -uu -pp
$(
ROBOT
)
/hd0a/
$(
DESTDIR
)
hijacknet_extctrl2014.mc"
.PHONY
:
robot_commands
.PHONY
:
robot_commands
robot_commands
:
robot_commands
:
...
@@ -101,8 +116,11 @@ robot_commands:
...
@@ -101,8 +116,11 @@ robot_commands:
@
echo
"ld < /hd0a/
$(
DESTDIR
)
/hijacknet_hpnet.mc"
@
echo
"ld < /hd0a/
$(
DESTDIR
)
/hijacknet_hpnet.mc"
@
echo
"ld < /hd0a/
$(
DESTDIR
)
/hijacknet_fei.mc"
@
echo
"ld < /hd0a/
$(
DESTDIR
)
/hijacknet_fei.mc"
@
echo
"ld < /hd0a/
$(
DESTDIR
)
/hijacknet.mc"
@
echo
"ld < /hd0a/
$(
DESTDIR
)
/hijacknet.mc"
@
echo
@
echo
"ld < /hd0a/
$(
DESTDIR
)
/hijacknet_test.mc"
@
echo
"ld < /hd0a/
$(
DESTDIR
)
/hijacknet_test.mc"
@
echo
@
echo
"ld < /hd0a/
$(
DESTDIR
)
/hijacknet_extctrl2014.mc"
@
echo
"hijacknet_extctrl2014_connect
\"
fei0
\"
,
\"
38:60:77:b5:0e:cf
\"
"
.PHONY
:
clean
.PHONY
:
clean
clean
:
clean
:
...
@@ -114,3 +132,4 @@ distclean: clean
...
@@ -114,3 +132,4 @@ distclean: clean
hijacknet_fei.mc
:
fei82557.mc.h hijacknet_private.h
hijacknet_fei.mc
:
fei82557.mc.h hijacknet_private.h
hijacknet.mc
:
hijacknet.h
hijacknet.mc
:
hijacknet.h
hijacknet_extctrl2014.mc
:
extctrl2014_lc.mc
This diff is collapsed.
Click to expand it.
mc/extctrl_pub.irc5_main_110310.h
0 → 100644
+
98
−
0
View file @
61a401a8
#ifndef _EXTCTRL_PUB_H_
#define _EXTCTRL_PUB_H_
typedef
struct
{
int
value
[
4
];
}
axis_configuration_t
;
// Up to 128 axes (32 * 4)
typedef
struct
{
int
manualMode
;
// 1 = teach mode
int
controlActive
;
// 1 = at least torque mode active
}
controller_state
;
typedef
struct
extctrl_irb2ext_joint
{
/* Control parameters: */
float
parKp
;
/* Position control proportional gain. */
float
parKv
;
/* Velocity control proportional gain. */
float
parKi
;
/* Velocity control integration gain. */
float
parTrqMin
;
/* Minimum torque (control output) allowed. */
float
parTrqMax
;
/* Dito maximum. */
/* Exposed (measured or computed) states: */
double
posRawAbs
;
/* Measured unfiltered motor angle. [abs] */
double
posRawFb
;
/* Measured unfiltered motor angle. [feedback] */
double
posFlt
;
/* Filtered motor angle. */
float
velRaw
;
/* Unfiltered angular velocity. */
float
velFlt
;
/* Dito filtered, also for motor shaft. */
float
velOut
;
/* Dito according to actual velocity control ref. */
float
trqRaw
;
/* Measured (or internal) unfiltered torque. */
float
trqRefFlt
;
/* filtered Torque ref */
double
posRef
;
/* Nominal position reference. */
float
velRef
;
/* Dito for the velocity reference/feedforward. */
float
trqFfw
;
/* Model-based torque feedforward. */
float
trqFfwGrav
;
/* total dynamic model based torque. */
}
EXTCTRL_IRB2EXT_JOINT
;
typedef
struct
extctrl_ext2irb_joint
{
/* Possibly updated control parameters: */
float
parKp
;
float
parKv
;
float
parKi
;
/* Modified references and feed forward: */
double
posRef
;
float
velRef
;
float
trqFfw
;
}
EXTCTRL_EXT2IRB_JOINT
;
typedef
struct
extctrl_communication_data
{
int
instruction
;
float
value1
;
float
value2
;
float
value3
;
float
value4
;
float
value5
;
float
value6
;
char
str1
[
20
];
char
str2
[
20
];
}
EXTCTRL_COMMUNICATION_DATA
;
/* To use extctrl_communication from RAPID
* RAPID SYNTAX:
*
* VAR mocgendata mydata=[1,2,3,4,5,6,'str1','str2'];
* MocGenInstr 88999, mydata
* mydata is written to extctrl_communication and NEW data is returned
*/
/*
* To be called by programs invoked from VxWorks prompt,
* i.e. concurrently, hence we need mutex protection. Mutex
* is allocated by extctrl_initialize.
*/
typedef
int
(
*
extctrl_active_cb
)(
axis_configuration_t
axis_configuration
);
typedef
int
(
*
extctrl_submit_cb
)(
controller_state
ctrl_state
,
axis_configuration_t
axis_configuration
,
EXTCTRL_IRB2EXT_JOINT
*
joint
);
typedef
int
(
*
extctrl_obtain_cb
)(
axis_configuration_t
axis_configuration
,
EXTCTRL_EXT2IRB_JOINT
*
joint
);
typedef
int
(
*
extctrl_communication_cb
)(
axis_configuration_t
ac
,
EXTCTRL_COMMUNICATION_DATA
*
data
);
#define extctrl_install_callbacks extctrl_install_callbacks_irc5_110310
int
extctrl_install_callbacks
(
extctrl_active_cb
submit_active
,
extctrl_submit_cb
submit
,
extctrl_active_cb
obtain_active
,
extctrl_obtain_cb
obtain
,
extctrl_active_cb
communication_active
,
extctrl_communication_cb
communication
);
#endif
This diff is collapsed.
Click to expand it.
mc/hijacknet_extctrl2014.c
0 → 100644
+
1318
−
0
View file @
61a401a8
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