ros-naoqi / naoqi_driver

c++ bridge based on libqi
Apache License 2.0
52 stars 93 forks source link

add touch event and converters #49

Closed k-okada closed 8 years ago

k-okada commented 9 years ago

Ok, finally I found a way write event driven code instead of #48 This will provide equiavalent functions as we had in naoqi_tactile.py

QUESTIONS:

1) we had following error/warning message for every event callback, Any idea?

LeftBumperPressed 1
[E] 14911 qitype.object: No such property 100
[E] 14911 qitype.object: No such signal 100
LeftBumperPressed 0
[E] 14913 qitype.object: No such property 100
[E] 14913 qitype.object: No such signal 100
FrontTactilTouched 1
[E] 14912 qitype.object: No such property 100
[E] 14912 qitype.object: No such signal 100

2) I tried to write this using template class but it couldn't, even class inheretance...

I'm not c++ programmer so I missed something, but even if I was able to compile them, we had runtime error as follows...

found a catkin URDF /opt/ros/indigo/share/naoqi_driver/share/urdf/pepper.urdf
Audio Extractor: Start
terminate called after throwing an instance of 'std::runtime_error'
  what():  Object<T> can only be used on registered object types. (N5naoqi18TouchEventRegisterE)(0)
Aborted (core dumped)
k-okada commented 9 years ago

ok, finally I am able to refacter with template classes, still it outputs

LeftBumperPressed 1
[E] 14911 qitype.object: No such property 100
[E] 14911 qitype.object: No such signal 100
LeftBumperPressed 0
[E] 14913 qitype.object: No such property 100
[E] 14913 qitype.object: No such signal 100
FrontTactilTouched 1
[E] 14912 qitype.object: No such property 100
[E] 14912 qitype.object: No such signal 100

but it does working. @Karsten1987 @vrabaud , please review. Note that this requires https://github.com/ros-naoqi/naoqi_driver/pull/47 for running.

suryaambrose commented 8 years ago

Hi !

Sorry it took so long before someone replies. At first glance it seems good, I will try to take more time to review and test soon. I also do not really know right now how to get rid of your error outputs, I remember seeing these but not why or when. I'll investigate too.

vrabaud commented 8 years ago

@suryaambrose , can we merge that ? I think it blocks https://github.com/ros-naoqi/naoqi_driver/pull/56/commits (which has the same touch commits). Thx.

suryaambrose commented 8 years ago

OK for me. I ran a test with Nao, it works fine.

About your "No such (property|signal) 100" errors, it is a bug in libqi that was solved in May: https://github.com/aldebaran/libqi/commit/793cb6592a830318cae2a1667738a0247f8dc1cd @vrabaud maybe we need to update something ? I am not completely familiar with ROS release process, and I don't know if libqi-release package is automatically updated or not with the original libqi.

Anyway this PR is not responsible, anyone using up-to-date libqi will not have those errors.