Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace controlboardwrapper2 w/ controlBoard_nws_yarp #808

Merged
merged 1 commit into from
Jun 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions app/simConfig/conf/Sim_head.ini
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
/// initialization file for the head of the iCub Simulation

device controlboardwrapper2
device controlBoard_nws_yarp
subdevice simulationcontrol
name /head
rate 100
period 0.02

[GENERAL]
Type 3
TotalJoints 6 //total number of joints....

AxisMap 0 1 2 3 4 5
Vel 20.0
Zeros 0.0 0.0 0.0 0.0 0.0 0.0
Encoder 0.0174533 0.0174533 0.0174533 0.0174533 0.0174533 0.0174533
Expand Down
5 changes: 2 additions & 3 deletions app/simConfig/conf/Sim_left_arm.ini
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
/// initialization file for the left arm of the iCub Simulation

device controlboardwrapper2
device controlBoard_nws_yarp
subdevice simulationcontrol
name /left_arm
rate 100
period 0.02

[GENERAL]
Type 1 /// 1 is for the left arm ///2 is for the right....
TotalJoints 16 //total number of joints....

AxisMap 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Vel 20.0
Zeros 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
Encoder 0.0174533 0.0174533 0.0174533 0.0174533 0.0174533 0.0174533 0.0174533 0.0174533 0.0174533 0.0174533 0.0174533 0.0174533 0.0174533 0.0174533 0.0174533 0.0174533
Expand Down
5 changes: 2 additions & 3 deletions app/simConfig/conf/Sim_left_leg.ini
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
/// initialization file for the head of the iCub Simulation

device controlboardwrapper2
device controlBoard_nws_yarp
subdevice simulationcontrol
name /left_leg
rate 100
period 0.02

[GENERAL]
Type 4
TotalJoints 6 //total number of joints....

AxisMap 0 1 2 3 4 5
Vel 20.0
Zeros 0.0 0.0 0.0 0.0 0.0 0.0
Encoder 0.0174533 0.0174533 0.0174533 0.0174533 0.0174533 0.0174533
Expand Down
5 changes: 2 additions & 3 deletions app/simConfig/conf/Sim_right_arm.ini
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
/// initialization file for the right arm of the iCub Simulation

device controlboardwrapper2
device controlBoard_nws_yarp
subdevice simulationcontrol
name /right_arm
rate 100
period 0.02

[GENERAL]
Type 2 /// 1 is for the left arm ///2 is for the right....
TotalJoints 16 //total number of joints....

AxisMap 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Vel 20.0
Zeros 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
Encoder 0.0174533 0.0174533 0.0174533 0.0174533 0.0174533 0.0174533 0.0174533 0.0174533 0.0174533 0.0174533 0.0174533 0.0174533 0.0174533 0.0174533 0.0174533 0.0174533
Expand Down
5 changes: 2 additions & 3 deletions app/simConfig/conf/Sim_right_leg.ini
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
/// initialization file for the head of the iCub Simulation

device controlboardwrapper2
device controlBoard_nws_yarp
subdevice simulationcontrol
name /right_leg
rate 100
period 0.02

[GENERAL]
Type 5
TotalJoints 6 //total number of joints....

AxisMap 0 1 2 3 4 5
Vel 20.0
Zeros 0.0 0.0 0.0 0.0 0.0 0.0
Encoder 0.0174533 0.0174533 0.0174533 0.0174533 0.0174533 0.0174533
Expand Down
5 changes: 2 additions & 3 deletions app/simConfig/conf/Sim_torso.ini
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
/// initialization file for the head of the iCub Simulation

device controlboardwrapper2
device controlBoard_nws_yarp
subdevice simulationcontrol
name /torso
rate 100
period 0.02

[GENERAL]
Type 6
TotalJoints 3 //total number of joints....

AxisMap 0 1 2
Vel 20.0
Zeros 0.0 0.0 0.0
Encoder 0.0174533 0.0174533 0.0174533
Expand Down
3 changes: 1 addition & 2 deletions src/libraries/icubmod/canBusMotionControl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@
# Authors: Lorenzo Natale
# CopyPolicy: Released under the terms of the GNU GPL v2.0.


yarp_prepare_plugin(canmotioncontrol
CATEGORY device
TYPE yarp::dev::CanBusMotionControl
INCLUDE CanBusMotionControl.h
EXTRA_CONFIG WRAPPER=controlboardwrapper2)
EXTRA_CONFIG WRAPPER=controlBoard_nws_yarp)

if (ENABLE_icubmod_canmotioncontrol)

Expand Down
2 changes: 1 addition & 1 deletion src/libraries/icubmod/embObjMotionControl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ yarp_prepare_plugin(embObjMotionControl
CATEGORY device
TYPE yarp::dev::embObjMotionControl
INCLUDE embObjMotionControl.h
EXTRA_CONFIG WRAPPER=controlboardwrapper2)
EXTRA_CONFIG WRAPPER=controlBoard_nws_yarp)
pattacini marked this conversation as resolved.
Show resolved Hide resolved

IF (NOT SKIP_embObjMotionControl)

Expand Down
12 changes: 6 additions & 6 deletions src/simulators/iCubSimulation/wrapper/SimulatorModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -436,46 +436,46 @@ bool SimulatorModule::initSimulatorModule()
//start left arm device driver
iCubLArm = createPart("left_arm");
desc.device_name = moduleName+"/left_arm";
desc.device_type = "controlboardwrapper2";
desc.device_type = "controlBoard_nws_yarp";
if (idesc) idesc->registerDevice(desc);
}

if (robot_flags.actRArm || robot_flags.actRHand) {
//start right arm device driver
iCubRArm = createPart("right_arm");
desc.device_name = moduleName + "/right_arm";
desc.device_type = "controlboardwrapper2";
desc.device_type = "controlBoard_nws_yarp";
if (idesc) idesc->registerDevice(desc);
}

if (robot_flags.actHead) {
//start head device driver
iCubHead = createPart("head");
desc.device_name = moduleName + "/head";
desc.device_type = "controlboardwrapper2";
desc.device_type = "controlBoard_nws_yarp";
if (idesc) idesc->registerDevice(desc);
}

if (robot_flags.actLegs) {
//start left leg device driver
iCubLLeg = createPart("left_leg");
desc.device_name = moduleName + "/left_leg";
desc.device_type = "controlboardwrapper2";
desc.device_type = "controlBoard_nws_yarp";
if (idesc) idesc->registerDevice(desc);
}

if (robot_flags.actLegs) {
//start right leg device driver
iCubRLeg = createPart("right_leg");
desc.device_name = moduleName + "/right_leg";
desc.device_type = "controlboardwrapper2";
desc.device_type = "controlBoard_nws_yarp";
if (idesc) idesc->registerDevice(desc);
}
if (robot_flags.actTorso) {
//start torso device driver
iCubTorso = createPart("torso");
desc.device_name = moduleName + "/torso";
desc.device_type = "controlboardwrapper2";
desc.device_type = "controlBoard_nws_yarp";
if (idesc) idesc->registerDevice(desc);
}

Expand Down
10 changes: 2 additions & 8 deletions src/simulators/iCubSimulation/wrapper/iCubSimulationControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,15 +186,9 @@ bool iCubSimulationControl::open(yarp::os::Searchable& config) {
/* GENERAL */
/////////////////////////

Bottle& xtmp = p.findGroup("GENERAL").findGroup("AxisMap","a list of reordered indices for the axes");

if (xtmp.size() != njoints+1) {
yError("AxisMap does not have the right number of entries\n");
return false;
}
for (int i = 1; i < xtmp.size(); i++) axisMap[i-1] = xtmp.get(i).asInt32();
for (int i = 0; i < njoints; i++) axisMap[i] = i;

xtmp = p.findGroup("GENERAL").findGroup("Encoder","a list of scales for the encoders");
Bottle& xtmp = p.findGroup("GENERAL").findGroup("Encoder","a list of scales for the encoders");
if (xtmp.size() != njoints+1) {
yError("Encoder does not have the right number of entries\n");
return false;
Expand Down