juaruipav / rclgo

A go wrapper for the ROS2 Core Libraries (RCL).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The question about how to run pub/sub program.

HiroiImanishi opened this issue · comments

Excuse me,
I try to run test pub/sub program as written in README.md,but I have trouble with running it.

~$ git clone https://github.com/juaruipav/rclgo.git
~$ cd ./rclgo/publisher
~/rclgo/publisher$ go test

Error message is

publisher.go:20:2: cannot find package "rclgo/node" in any of:
	/usr/lib/go-1.10/src/rclgo/node (from $GOROOT)
	/home/imanishi/go/src/rclgo/node (from $GOPATH)
publisher.go:21:2: cannot find package "rclgo/types" in any of:
	/usr/lib/go-1.10/src/rclgo/types (from $GOROOT)
	/home/imanishi/go/src/rclgo/types (from $GOPATH)

I read this message,then I copied rclgo directory to specified paths,and
~/go/src/rclgo/publisher$ go test
then,this message appeared.

# rclgo/types
In file included from /usr/lib/go-1.10/src/rclgo/types/msg_std_msgs_float32.go:7:0:
./msg_types.h:4:10: fatal error: rcl/rcl.h: No such file or directory
 #include <rcl/rcl.h>
          ^~~~~~~~~~~
compilation terminated.
FAIL	_/home/imanishi/go/src/rclgo/publisher [build failed]

My environment is
Ubuntu18.02
ROS2 dashing

I has just started learning ROS2 and I would be grateful if you could tell me a cause of this trouble or how to run pub/sub program.
I am sorry that my English is not good.

Currently, this proof of concept was made using ROS 2 Bouncy and it was a little bit hardcoded. The idea is to support the latest version of the RCL libraries (step by step).

However, I close the issue since I recently added a Dockerfile ecosystem to try the tool without installing ROS distributions

Regards,
JJ

Thank you so much for reply.
I understand the reason.