Hi,
I am now going through "SensorWalkSkill“ tutorial on Windows 10, and I find that HEXA could be connected but won’t stand up.
Here is the code in sensorwalkskill.go
:
package SensorWalkSkill
import (
"mind/core/framework/drivers/hexabody"
"mind/core/framework/skill"
)
type SensorWalkSkill struct {
skill.Base
}
func NewSkill() skill.Interface {
// Use this method to create a new skill.
return &SensorWalkSkill{}
}
func (d *SensorWalkSkill) OnStart() {
// Use this method to do something when this skill is starting.
err := hexabody.Start()
if err != nil {
log.Error.Println("Hexabody start err:", err)
return
}
hexabody.Stand()
}
func (d *SensorWalkSkill) OnClose() {
// Use this method to do something when this skill is closing.
hexabody.Close()
}
func (d *SensorWalkSkill) OnConnect() {
// Use this method to do something when the remote connected.
}
func (d *SensorWalkSkill) OnDisconnect() {
// Use this method to do something when the remote disconnected.
}
func (d *SensorWalkSkill) OnRecvJSON(data []byte) {
// Use this method to do something when skill receive json data from remote client.
}
func (d *SensorWalkSkill) OnRecvString(data string) {
// Use this method to do something when skill receive string from remote client.
}
And here is the output of running mind run
command:
PS C:\Users\Administrator\SensorWalkSkill> mind build
PS C:\Users\Administrator\SensorWalkSkill> mind pack
PS C:\Users\Administrator\SensorWalkSkill> mind run
Installation started
Uploading 0%
Uploading 67%
Installing 80%
Installation successful !
Point your browser to: http://localhost:7597
Connecting
Connected !
Battery: 54.00% [Not charging]
I do init the Skill by using mind init SensorWalkSkill
command. I also noticed another thread topic created by @entinus that shares the same issue as mine but I don’t think the cause of the issue is the same. See: Can’t run my skill
Could you please help me? Thanks a lot.