how to use ros android ndk to build my own c++ ros codes to adnroid?

asked 2019-03-25 09:26:42 -0500

yueweiliang gravatar image

updated 2019-04-06 18:50:36 -0500

jayess gravatar image

Nowadays I have followed the tutroil, after that I still don't know how to build my c++ codes to android app.Now I have face a qustion:

how to add my new msgs ? here is my error file. I want to add two new msgs, One is Marker other is MarkerArray, here is my CMakelists.txt:

cmake_minimum_required(VERSION 2.8.3)
find_package(catkin REQUIRED COMPONENTS
  message_generation
  geometry_msgs
  std_msgs)
add_message_files(FILES Marker.msg MarkerArray.msg)
generate_messages(DEPENDENCIES std_msgs geometry_msgs)
catkin_package(
  CATKIN_DEPENDS
    message_runtime
    geometry_msgs
    std_msgs
)

the error is MarkerArray can not been built, it always ask me to add generate_messages() which I already do, these two msgs have no error in c++ under Ubuntu.by the way, the msg's namespace is not nnmk_msgs, but android_pkg1......how can I get a normal msg like under Ubuntu? and how to build my c++ to android, the tutorials seem still too difficult to understand.thx ahead~

edit retag flag offensive close merge delete