How to compile the move_base_app using Binary Distribution
I tried to use the Binary Distribution ndk module to run ros on Android, I compiled the sample app with the tutorial http://wiki.ros.org/android_ndk/Tutorials/SimpleNativeActivityApplication succefully.
But when I want to compile the movebaseapp (http://wiki.ros.org/android_ndk/Tutorials/move_baseNativeActivityApplication) 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);
va_end(args);
}
void android_main(android_app *papp) {
// Make sure glue isn't stripped
app_dummy();
int argc = 4;
// TODO: don't hardcode ip addresses
char *argv[] = {"nothing_important" , "__master:=http://192.168.1.100:11311",
"__ip:=192.168.1.101", "cmd_vel:=navigation_velocity_smoother/raw_cmd_vel"};
for(int i = 0; i < argc; i++){
log(argv[i]);
}
ros::init(argc, &argv[0], "move_base");
std::string master_uri = ros::master::getURI();
if(ros::master::check()){
log("ROS MASTER IS UP!");
} else {
log("NO ROS MASTER.");
}
log(master_uri.c_str());
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){
ros::spinOnce();
loop_rate.sleep();
}
}
How should I do to compile the app?
Asked by GhostFlying on 2015-06-17 07:57:10 UTC
Comments
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.
Asked by Gary Servin on 2015-07-01 10:14:20 UTC
did you find any solution?
Asked by Zargol on 2015-12-01 09:51:19 UTC