2 #include "geometry_msgs/Twist.h" 6 int main(
int argc,
char **argv)
9 std::string pheeno_name;
17 std::string pheeno_number = cml_parser(
"-n");
18 pheeno_name =
"/pheeno_" + pheeno_number;
19 std::cout << pheeno_name << std::endl;
23 ROS_ERROR(
"Need to provide Pheeno number!");
27 ros::init(argc, argv,
"random_walk_node");
37 double current_duration;
38 double angular = 0.07;
39 double turn_direction = pheeno.
randomTurn(angular);
40 geometry_msgs::Twist cmd_vel_msg;
47 if (current_duration <= 10.0) {
48 cmd_vel_msg.linear.x = 0.0;
49 cmd_vel_msg.angular.z = turn_direction;
51 }
else if (current_duration < 20.0) {
52 cmd_vel_msg.linear.x = 0.05;
53 cmd_vel_msg.angular.z = 0.0;
void publish(geometry_msgs::Twist velocity)
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
double randomTurn(float angular=0.06)
ROSCPP_DECL void spinOnce()
int main(int argc, char **argv)