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

Support for addressing ICC communication in MC #431

Merged
merged 16 commits into from
Oct 24, 2023
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
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ extern void eoprot_fun_UPDT_mc_joint_config(const EOnv* nv, const eOropdescripto

if((eo_motcon_mode_foc == mcmode))
{
MController_config_joint(jxx, cfg, mcmode);
MController_config_joint(jxx, cfg);
}

}
Expand Down Expand Up @@ -264,7 +264,6 @@ extern void eoprot_fun_UPDT_mc_joint_cmmnds_setpoint(const EOnv* nv, const eOrop
case eomc_setpoint_velocity:
{
MController_set_joint_vel_ref(jxx, setpoint->to.velocity.value, setpoint->to.velocity.withacceleration);
//MController_set_joint_vel_raw(jxx, setpoint->to.velocity.value);
} break;

case eomc_setpoint_torque:
Expand Down Expand Up @@ -348,7 +347,7 @@ extern void eoprot_fun_UPDT_mc_joint_cmmnds_controlmode(const EOnv* nv, const eO

if((eo_motcon_mode_foc == mcmode))
{
MController_set_control_mode(jxx, (eOmc_controlmode_command_t)(*controlmode));
MController_set_control_mode(jxx, *controlmode);
}

}
Expand Down Expand Up @@ -471,7 +470,6 @@ extern void eoprot_fun_UPDT_mc_motor_config_currentlimits(const EOnv* nv, const
eOprotIndex_t mxx = eoprot_ID2index(rd->id32);

eOmc_current_limits_params_t *currentLimits = (eOmc_current_limits_params_t*)rd->data;
eOmeas_current_t curr = currentLimits->overloadCurrent;

eOmotioncontroller_mode_t mcmode = s_motorcontrol_getmode();

Expand All @@ -494,13 +492,6 @@ extern void eoprot_fun_UPDT_mc_motor_config_currentlimits(const EOnv* nv, const

if(eo_motcon_mode_foc == mcmode)
{
// send the can message to relevant board
eOcanprot_command_t command = {0};
command.clas = eocanprot_msgclass_pollingMotorControl;
command.type = ICUBCANPROTO_POL_MC_CMD__SET_CURRENT_LIMIT;
command.value = &curr;
eo_canserv_SendCommandToEntity(eo_canserv_GetHandle(), &command, rd->id32);

MController_motor_config_max_currents(mxx, currentLimits);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ namespace embot { namespace app { namespace eth {
.property =
{
Process::eApplication,
{1, 2},
{2023, Month::Oct, Day::twentytwo, 10, 00}
{1, 3},
{2023, Month::Oct, Day::twentyfour, 15, 21}
},
.OStick = 1000*embot::core::time1microsec,
.OSstacksizeinit = 10*1024,
Expand Down
56 changes: 34 additions & 22 deletions emBODY/eBcode/arch-arm/board/amc/application/v1/proj/appl-01.uvoptx
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@

<Group>
<GroupName>main</GroupName>
<tvExp>1</tvExp>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
Expand All @@ -256,7 +256,7 @@

<Group>
<GroupName>embot::app::eth</GroupName>
<tvExp>1</tvExp>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
Expand Down Expand Up @@ -372,7 +372,7 @@

<Group>
<GroupName>embot::app::eth::config</GroupName>
<tvExp>1</tvExp>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
Expand Down Expand Up @@ -1076,7 +1076,7 @@

<Group>
<GroupName>embot::os::EOM</GroupName>
<tvExp>1</tvExp>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
Expand Down Expand Up @@ -1944,7 +1944,7 @@

<Group>
<GroupName>eo-state-run</GroupName>
<tvExp>1</tvExp>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
Expand Down Expand Up @@ -2264,7 +2264,7 @@

<Group>
<GroupName>embot::app::eth::theHandler</GroupName>
<tvExp>1</tvExp>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
Expand Down Expand Up @@ -2328,7 +2328,7 @@

<Group>
<GroupName>embot::app::eth::theServiceMC</GroupName>
<tvExp>0</tvExp>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
Expand Down Expand Up @@ -2356,6 +2356,18 @@
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>33</GroupNumber>
<FileNumber>156</FileNumber>
<FileType>8</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\..\..\embot\app\eth\embot_app_eth_mc_messaging.cpp</PathWithFileName>
<FilenameWithoutPath>embot_app_eth_mc_messaging.cpp</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>

<Group>
Expand All @@ -2366,7 +2378,7 @@
<RteFlg>0</RteFlg>
<File>
<GroupNumber>34</GroupNumber>
<FileNumber>156</FileNumber>
<FileNumber>157</FileNumber>
<FileType>8</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
Expand All @@ -2378,7 +2390,7 @@
</File>
<File>
<GroupNumber>34</GroupNumber>
<FileNumber>157</FileNumber>
<FileNumber>158</FileNumber>
<FileType>8</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
Expand All @@ -2390,7 +2402,7 @@
</File>
<File>
<GroupNumber>34</GroupNumber>
<FileNumber>158</FileNumber>
<FileNumber>159</FileNumber>
<FileType>8</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
Expand All @@ -2402,7 +2414,7 @@
</File>
<File>
<GroupNumber>34</GroupNumber>
<FileNumber>159</FileNumber>
<FileNumber>160</FileNumber>
<FileType>8</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
Expand All @@ -2414,7 +2426,7 @@
</File>
<File>
<GroupNumber>34</GroupNumber>
<FileNumber>160</FileNumber>
<FileNumber>161</FileNumber>
<FileType>8</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
Expand All @@ -2426,7 +2438,7 @@
</File>
<File>
<GroupNumber>34</GroupNumber>
<FileNumber>161</FileNumber>
<FileNumber>162</FileNumber>
<FileType>8</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
Expand All @@ -2438,7 +2450,7 @@
</File>
<File>
<GroupNumber>34</GroupNumber>
<FileNumber>162</FileNumber>
<FileNumber>163</FileNumber>
<FileType>8</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
Expand All @@ -2450,7 +2462,7 @@
</File>
<File>
<GroupNumber>34</GroupNumber>
<FileNumber>163</FileNumber>
<FileNumber>164</FileNumber>
<FileType>8</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
Expand All @@ -2462,7 +2474,7 @@
</File>
<File>
<GroupNumber>34</GroupNumber>
<FileNumber>164</FileNumber>
<FileNumber>165</FileNumber>
<FileType>8</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
Expand All @@ -2482,7 +2494,7 @@
<RteFlg>0</RteFlg>
<File>
<GroupNumber>35</GroupNumber>
<FileNumber>165</FileNumber>
<FileNumber>166</FileNumber>
<FileType>8</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
Expand All @@ -2494,7 +2506,7 @@
</File>
<File>
<GroupNumber>35</GroupNumber>
<FileNumber>166</FileNumber>
<FileNumber>167</FileNumber>
<FileType>8</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
Expand All @@ -2514,7 +2526,7 @@
<RteFlg>0</RteFlg>
<File>
<GroupNumber>36</GroupNumber>
<FileNumber>167</FileNumber>
<FileNumber>168</FileNumber>
<FileType>8</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
Expand All @@ -2534,7 +2546,7 @@
<RteFlg>0</RteFlg>
<File>
<GroupNumber>37</GroupNumber>
<FileNumber>168</FileNumber>
<FileNumber>169</FileNumber>
<FileType>8</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
Expand All @@ -2554,7 +2566,7 @@
<RteFlg>0</RteFlg>
<File>
<GroupNumber>38</GroupNumber>
<FileNumber>169</FileNumber>
<FileNumber>170</FileNumber>
<FileType>8</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
Expand All @@ -2566,7 +2578,7 @@
</File>
<File>
<GroupNumber>38</GroupNumber>
<FileNumber>170</FileNumber>
<FileNumber>171</FileNumber>
<FileType>8</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1458,6 +1458,11 @@
<FileType>8</FileType>
<FilePath>..\..\..\..\..\embot\app\eth\EOtheMCamc.cpp</FilePath>
</File>
<File>
<FileName>embot_app_eth_mc_messaging.cpp</FileName>
<FileType>8</FileType>
<FilePath>..\..\..\..\..\embot\app\eth\embot_app_eth_mc_messaging.cpp</FilePath>
</File>
</Files>
</Group>
<Group>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ extern void eoprot_fun_UPDT_mc_joint_config(const EOnv* nv, const eOropdescripto

if((eo_motcon_mode_foc == mcmode))
{
MController_config_joint(jxx, cfg, mcmode);
MController_config_joint(jxx, cfg);
}

}
Expand Down Expand Up @@ -371,7 +371,7 @@ extern void eoprot_fun_UPDT_mc_joint_cmmnds_controlmode(const EOnv* nv, const eO

if((eo_motcon_mode_foc == mcmode))
{
MController_set_control_mode(jxx, (eOmc_controlmode_command_t)(*controlmode));
MController_set_control_mode(jxx, *controlmode);
}

}
Expand Down Expand Up @@ -494,7 +494,6 @@ extern void eoprot_fun_UPDT_mc_motor_config_currentlimits(const EOnv* nv, const
eOprotIndex_t mxx = eoprot_ID2index(rd->id32);

eOmc_current_limits_params_t *currentLimits = (eOmc_current_limits_params_t*)rd->data;
eOmeas_current_t curr = currentLimits->overloadCurrent;

eOmotioncontroller_mode_t mcmode = s_motorcontrol_getmode();

Expand All @@ -517,13 +516,6 @@ extern void eoprot_fun_UPDT_mc_motor_config_currentlimits(const EOnv* nv, const

if(eo_motcon_mode_foc == mcmode)
{
// send the can message to relevant board
eOcanprot_command_t command = {0};
command.clas = eocanprot_msgclass_pollingMotorControl;
command.type = ICUBCANPROTO_POL_MC_CMD__SET_CURRENT_LIMIT;
command.value = &curr;
eo_canserv_SendCommandToEntity(eo_canserv_GetHandle(), &command, rd->id32);

MController_motor_config_max_currents(mxx, currentLimits);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ extern "C" {
#define EOMTHEEMSAPPLCFG_VERSION_MAJOR (VERSION_MAJOR_OFFSET+3)
// <o> minor <0-255>
// <o> minor <0-255>
#define EOMTHEEMSAPPLCFG_VERSION_MINOR 76
#define EOMTHEEMSAPPLCFG_VERSION_MINOR 77

// </h>version

Expand All @@ -91,11 +91,11 @@ extern "C" {
// <o> month <1-12>
#define EOMTHEEMSAPPLCFG_BUILDDATE_MONTH 10
// <o> day <1-31>
#define EOMTHEEMSAPPLCFG_BUILDDATE_DAY 10
#define EOMTHEEMSAPPLCFG_BUILDDATE_DAY 24
// <o> hour <0-23>
#define EOMTHEEMSAPPLCFG_BUILDDATE_HOUR 21
#define EOMTHEEMSAPPLCFG_BUILDDATE_HOUR 15
// <o> minute <0-59>
#define EOMTHEEMSAPPLCFG_BUILDDATE_MIN 00
#define EOMTHEEMSAPPLCFG_BUILDDATE_MIN 20
// </h>build date
// </h>Info

Expand Down
Loading