Skip to content

DHREngineering/Odrive

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ODrive

Odrive controller library written in C++

Generic badge Generic badge

Requirements

Usage

The libaray consists of an odrive class and a thin wrapper functions that make working wiht the object easier. In order to use the libarary, you first need to create and initialize an odrive object:

int main(){
...
dhr:odrive od;
uint64_t serial_number = 0x000000000001;
od.init(serial_number);
...
}

From there you need to request the Odrive's json config file:

Json::Value json;
dhr::getJson(&od, &json);

Finally you can read and write from and to the Odrive the following way:

...
//WRITE
uint32_t state1 = 6; //Odrive's parameters' classes should be set appropriately to the documentation
dhr::writeOdriveData(&od, json, "axis0.requested_state", state1);

//READ
float vel_es;
dhr::readOdriveData(&od, json, "axis0.encoder.vel_estimate",vel_es);

...

Exmaple usage you can here

About

ODrive controller library Written in C++

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages