How to compile the move_base_app using Binary Distribution

asked 2015-06-17 07:57:10 -0500

GhostFlying gravatar image

I tried to use the Binary Distribution ndk module to run ros on Android, I compiled the sample app with the tutorial succefully.

But when I want to compile the move_base_app ( ) like the previous, I found the error:

error: undefined reference to 'move_base::MoveBase::MoveBase(tf::TransformListener&)

the source of the cpp file is below:

#include "ros/ros.h"
#include <move_base/move_base.h>

#include <android_native_app_glue.h>
#include <android/log.h>

void log(const char *msg, ...) {
    va_list args;
    va_start(args, msg);
    __android_log_vprint(ANDROID_LOG_INFO, "MOVE_BASE_NDK_EXAMPLE", msg, args);

void android_main(android_app *papp) {
    // Make sure glue isn't stripped

    int argc = 4;
    // TODO: don't hardcode ip addresses
    char *argv[] = {"nothing_important" , "__master:=",
                    "__ip:=", "cmd_vel:=navigation_velocity_smoother/raw_cmd_vel"};

    for(int i = 0; i < argc; i++){

    ros::init(argc, &argv[0], "move_base");

    std::string master_uri = ros::master::getURI();

        log("ROS MASTER IS UP!");
    } else {
        log("NO ROS MASTER.");

    ros::NodeHandle n;

    tf::TransformListener tf(ros::Duration(10));
    move_base::MoveBase move_base(tf);

    ros::WallRate loop_rate(100);
    while(ros::ok() && !papp->destroyRequested){

How should I do to compile the app?

edit retag flag offensive close merge delete


can you paste the full log somewhere like gist? In the last version, both examples are built together so it's weird that only the simple example is working for you.

Gary Servin gravatar image Gary Servin  ( 2015-07-01 10:14:20 -0500 )edit

did you find any solution?

Zargol gravatar image Zargol  ( 2015-12-01 08:51:19 -0500 )edit