ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Eman.m's profile - activity

2023-11-22 08:43:20 -0500 received badge  Famous Question (source)
2023-08-16 04:03:53 -0500 received badge  Famous Question (source)
2023-05-04 01:59:25 -0500 received badge  Famous Question (source)
2023-04-27 06:44:47 -0500 received badge  Famous Question (source)
2023-04-27 06:44:47 -0500 received badge  Notable Question (source)
2023-04-27 06:44:47 -0500 received badge  Popular Question (source)
2023-04-26 01:30:09 -0500 received badge  Famous Question (source)
2022-12-13 04:55:14 -0500 received badge  Famous Question (source)
2022-09-19 17:54:15 -0500 marked best answer Error when including .h from another package in the same workspace?

Hello

I have created a package GA_palnner for a custom global planner based on Genetic Algorithm.

Under src of GA_palnner:

CrossPoint.cpp , GA_global_planner_ros.cpp , GenericPathPlanner.cpp , Map.cpp , OccupancyGridMap.cpp , Path.cpp , Population.cpp

Under include of GA_palnner:

CrossPoint.h , GA_global_planner_ros.h , GenericPathPlanner.h , Map.h , OccupancyGridMap.h , Path.h , Population.h

The GA_planner works successfully as global planner plugin and I am able to move my robot in Gazeo using this planner.

Now, I created a package ros_global_planners_experiment to compare the performance of navfn and GA_planner ( gives the path length and running time for each).

In ros_global_planners_experiment_node.cpp

#include <ros/ros.h>
#include <costmap_2d/costmap_2d_ros.h>

#include <navfn/navfn_ros.h> // packageName/headerFile.h
#include "GA_planner/GA_global_planner_ros.h"

Gives me error:

fatal error: GA_global_planner_ros.h: No such file or directory #include "GA_global_planner_ros.h"

This is the package .xml and cMakeLists.txt for both GA_planner and ros_global_planners_experiment

GA_planner package.xml

<?xml version="1.0"?>
<package format="2">
  <name>GA_planner</name>
  <version>0.0.0</version>
  <description>The GA_planner package</description>

  <!-- One maintainer tag required, multiple allowed, one person per tag -->
  <!-- Example:  -->
  <!-- <maintainer email="jane.doe@example.com">Jane Doe</maintainer> -->
  <maintainer email="evadro@todo.todo">evadro</maintainer>


  <!-- One license tag required, multiple allowed, one license per tag -->
  <!-- Commonly used license strings: -->
  <!--   BSD, MIT, Boost Software License, GPLv2, GPLv3, LGPLv2.1, LGPLv3 -->
  <license>TODO</license>

  <buildtool_depend>catkin</buildtool_depend>

  <build_depend>costmap_2d</build_depend>
  <build_depend>geometry_msgs</build_depend>
  <build_depend>nav_core</build_depend>
  <build_depend>nav_msgs</build_depend>
  <build_depend>pluginlib</build_depend>
  <build_depend>roscpp</build_depend>
  <build_depend>rospy</build_depend>
  <build_depend>std_msgs</build_depend>
  <build_depend>tf</build_depend>

  <exec_depend>costmap_2d</exec_depend>
  <exec_depend>geometry_msgs</exec_depend>
  <exec_depend>nav_core</exec_depend>
  <exec_depend>nav_msgs</exec_depend>
  <exec_depend>pluginlib</exec_depend>
  <exec_depend>roscpp</exec_depend>
  <exec_depend>rospy</exec_depend>
  <exec_depend>std_msgs</exec_depend>
  <exec_depend>tf</exec_depend>


  <!-- The export tag contains other, unspecified, tags -->
  <export>
    <!-- Other tools can request additional information be placed here -->
<nav_core plugin="${prefix}/GA_planner_plugin.xml"/>
  </export>
</package>

GA_planner cMakeLists.txt

cmake_minimum_required(VERSION 2.8.3)
project(GA_planner)

## Compile as C++11, supported in ROS Kinetic and newer
# add_compile_options(-std=c++11)

## Find catkin macros and libraries
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
## is used, also find other catkin packages
find_package(catkin REQUIRED COMPONENTS
  costmap_2d
  geometry_msgs
  nav_core
  nav_msgs
  pluginlib
  roscpp
  rospy
  std_msgs
  tf
)


catkin_package(
  INCLUDE_DIRS include
#  LIBRARIES GA_planner
  CATKIN_DEPENDS costmap_2d geometry_msgs nav_core nav_msgs pluginlib roscpp rospy std_msgs tf
#  DEPENDS system_lib
)

include_directories(
 include
  ${catkin_INCLUDE_DIRS}
)

## Declare a C++ library
# add_library(${PROJECT_NAME}
#   src/${PROJECT_NAME}/GA_planner.cpp
# )

add_library(GA_planner_lib src/GA_global_planner_ros.cpp src/GenericPathPlanner.cpp src/Map.cpp src/OccupancyGridMap.cpp src/Path.cpp src/CrossPoint.cpp src/Population.cpp)

target_link_libraries(GA_planner_lib
    ${catkin_LIBRARIES}
    )
add_dependencies(GA_planner_lib ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})

ros_global_planners_experiment package.xml

<?xml version="1.0"?>
<package format="2">
  <name>ros_global_planners_experiment</name>
  <version>0.0.0</version>
  <description>The ros_global_planners_experiment package</description>

  <!-- One maintainer tag required, multiple allowed, one person per tag -->
  <!-- Example:  -->
  <!-- <maintainer email="jane.doe@example.com">Jane Doe</maintainer> -->
  <maintainer email="evadro@todo.todo">evadro</maintainer>


  <!-- One license tag required, multiple allowed, one license per tag -->
  <!-- Commonly used license strings: -->
  <!--   BSD, MIT, Boost ...
(more)
2022-08-16 09:06:13 -0500 received badge  Notable Question (source)
2022-08-16 09:06:11 -0500 received badge  Famous Question (source)
2022-06-11 08:49:16 -0500 received badge  Notable Question (source)
2022-06-11 08:49:16 -0500 received badge  Famous Question (source)
2022-06-11 08:49:16 -0500 received badge  Popular Question (source)
2022-05-23 09:16:49 -0500 received badge  Notable Question (source)
2022-05-10 01:07:38 -0500 received badge  Famous Question (source)
2022-05-07 03:58:17 -0500 received badge  Notable Question (source)
2022-04-23 08:32:11 -0500 received badge  Notable Question (source)
2022-04-14 03:25:00 -0500 received badge  Notable Question (source)
2022-04-14 03:25:00 -0500 received badge  Famous Question (source)
2022-04-06 09:24:17 -0500 received badge  Famous Question (source)
2022-01-26 05:05:01 -0500 received badge  Famous Question (source)
2022-01-26 05:05:01 -0500 received badge  Popular Question (source)
2022-01-26 05:05:01 -0500 received badge  Notable Question (source)
2022-01-12 10:51:58 -0500 received badge  Famous Question (source)
2022-01-09 04:46:00 -0500 received badge  Notable Question (source)
2022-01-05 04:34:37 -0500 received badge  Famous Question (source)
2021-12-08 12:49:31 -0500 received badge  Notable Question (source)
2021-12-01 01:32:55 -0500 received badge  Famous Question (source)
2021-11-15 05:25:25 -0500 received badge  Popular Question (source)
2021-11-14 23:16:24 -0500 marked best answer Buffer error in ROS melodic

Hi

This code fragment is perfectly working in ROS kinetic:

 tf::TransformListener tf_(ros::Duration(10));
  costmap_2d::Costmap2DROS willow_garage_costmap("willowgarage_costmap", tf_);

However, in ROS melodic, it gives error, I searched for it and tried to solve it by changing to:

 tf2_ros::Buffer tfBuffer;
  costmap_2d::Costmap2DROS willow_garage_costmap("willowgarage_costmap", tfBuffer);

But, this gives error:

Do not call canTransform or lookupTransform with a timeout unless you are using another thread for populating data. Without a dedicated thread it will always timeout. If you have a seperate thread servicing tf messages, call setUsingDedicatedThread(true) on your Buffer instance.

I think it is an issue with Buffer constructor, but I don't know how to fix it?

Help highly appreciated.

2021-11-14 23:16:14 -0500 answered a question Buffer error in ROS melodic

In ROS melodic, this fix the problem: tf2_ros::Buffer tfBuffer(ros::Duration(10)); tf2_ros::TransformListener tfLis

2021-11-11 10:12:54 -0500 commented answer Buffer error in ROS melodic

I modified the code to: // the follwoing three lines are used with ROS melodic tf2_ros::Buffer tfBuffer(ros::Durati

2021-11-11 09:05:09 -0500 commented answer Buffer error in ROS melodic

what about these two lines: tf2_ros::Buffer tfBuffer; costmap_2d::Costmap2DROS willow_garage_costmap("willowgarage_cost

2021-11-11 08:12:59 -0500 commented answer Buffer error in ROS melodic

Many thanks osilva. I already installed the navigation for melodic by: sudo apt-get install ros-melodic-navigation Whi

2021-11-11 07:36:05 -0500 commented question Buffer error in ROS melodic

As described above, I got an error and 2 notes.

2021-11-11 07:35:47 -0500 commented question Buffer error in ROS melodic

I got an error and 2 notes

2021-11-11 07:22:58 -0500 commented question Buffer error in ROS melodic

If I use: tf::TransformListener tf_(ros::Duration(10)); costmap_2d::Costmap2DROS willow_garage_costmap("willowgarage_

2021-11-11 07:22:51 -0500 commented question Buffer error in ROS melodic

If I use: tf::TransformListener tf_(ros::Duration(10)); costmap_2d::Costmap2DROS willow_garage_costmap("willowgarage_

2021-11-11 07:22:28 -0500 commented question Buffer error in ROS melodic

If I use: tf::TransformListener tf_(ros::Duration(10)); costmap_2d::Costmap2DROS willow_garage_costmap("willowgarage_

2021-11-11 07:21:47 -0500 commented question Buffer error in ROS melodic

If I use: tf::TransformListener tf_(ros::Duration(10)); costmap_2d::Costmap2DROS willow_garage_costmap("willowgarage_

2021-11-11 07:20:44 -0500 commented question Buffer error in ROS melodic

If I use: error: no matching function for call to ‘costmap_2d::Costmap2DROS::Costmap2DROS(const char [21], tf::Transfor

2021-11-11 07:20:30 -0500 commented question Buffer error in ROS melodic

If I use: error: no matching function for call to ‘costmap_2d::Costmap2DROS::Costmap2DROS(const char [21], tf::Transfor

2021-11-11 06:09:27 -0500 asked a question Buffer error in ROS melodic

Buffer error in ROS melodic Hi This code fragment is perfectly working in ROS kinetic: tf::TransformListener tf_(ros:

2021-10-21 09:37:05 -0500 received badge  Notable Question (source)
2021-10-20 11:05:21 -0500 received badge  Notable Question (source)
2021-10-19 01:01:30 -0500 received badge  Famous Question (source)
2021-10-07 05:58:42 -0500 received badge  Popular Question (source)
2021-10-07 03:20:25 -0500 commented answer Rviz as publisher and subscriber?

Thanks alot. AMCL subscribes to the topic initialpose as indicated here: http://wiki.ros.org/amcl So, can we consider

2021-10-06 14:28:18 -0500 asked a question Rviz as publisher and subscriber?

Rviz as publisher and subscriber? Hi Is Rviz considered both publisher and subscriber? I want to ensure the informatio