Add getJoint function & Share ip/port declaration

This commit is contained in:
AntoineH 2024-09-04 11:35:29 +02:00
parent 01514ad6d2
commit d950ba6d1d
4 changed files with 49 additions and 14 deletions

View file

@ -19,7 +19,6 @@ import (
)
var(
addr = "localhost:8080" //TODO: Add to cobra config
tgt_angles = []float64{} //TODO: Add to cobra config
)
@ -55,6 +54,7 @@ func init() {
//gRPC Client
func SetJoints(){
// Set up a connection to the server.
var addr = fmt.Sprintf("%s:%d", ip, port) //Defined in controller/serve
conn, err := grpc.NewClient(addr, grpc.WithTransportCredentials(insecure.NewCredentials()))
if err != nil {
log.Fatalf("did not connect: %v", err)