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

Megacephalo's profile - activity

2022-05-12 07:53:36 -0500 received badge  Notable Question (source)
2022-05-12 07:53:36 -0500 received badge  Famous Question (source)
2021-06-07 19:30:12 -0500 received badge  Favorite Question (source)
2021-06-07 19:30:03 -0500 marked best answer How to improve AMCL pose estimate?

Hi all,

While developing my own path planner, I found out that AMCL cannot yield acceptable pose estimate despite modifying all possible parameters. Here (with more detailed observation) I recorded a video to show how erroneous the estimation is. The platform used is a differential non-holonomic vehicle, the sensors are Hokuyo laser range finder with Asus Xtion camera at the front. And the AMCL configuration is as below assumed the argument tags' values are all correct (why can't it show the /node tag at the end?):

<node pkg="amcl" type="amcl" name="amcl">
<param name="use_map_topic"             value="$(arg use_map_topic)"/>
<!-- Publish scans from best pose at a max of 10 Hz -->
<param name="odom_model_type"           value="diff"/>
<param name="odom_alpha5"               value="0.1"/>
<param name="gui_publish_rate"          value="10.0"/>
<param name="laser_max_beams"             value="60"/>
<param name="laser_max_range"           value="12.0"/>
<param name="min_particles"             value="500"/>
<param name="max_particles"             value="2000"/>
<param name="kld_err"                   value="0.05"/>
<param name="kld_z"                     value="0.99"/>
<param name="odom_alpha1"               value="0.2"/>
<param name="odom_alpha2"               value="0.2"/>
<!-- translation std dev, m -->
<param name="odom_alpha3"               value="0.2"/>
<param name="odom_alpha4"               value="0.2"/>
<param name="laser_z_hit"               value="0.5"/>
<param name="laser_z_short"             value="0.05"/>
<param name="laser_z_max"               value="0.05"/>
<param name="laser_z_rand"              value="0.5"/>
<param name="laser_sigma_hit"           value="0.2"/>
<param name="laser_lambda_short"        value="0.1"/>
<param name="laser_model_type"          value="likelihood_field"/>
<!-- <param name="laser_model_type" value="beam"/> -->
<param name="laser_likelihood_max_dist" value="2.0"/>
<param name="update_min_d"              value="0.25"/>
<param name="update_min_a"              value="0.2"/>
<param name="odom_frame_id"             value="$(arg odom_frame_id)"/> 
<param name="base_frame_id"             value="$(arg base_frame_id)"/> 
<param name="global_frame_id"           value="$(arg global_frame_id)"/>
<param name="resample_interval"         value="1"/>
<!-- Increase tolerance because the computer can get quite busy -->
<param name="transform_tolerance"       value="1.0"/>
<param name="recovery_alpha_slow"       value="0.0"/>
<param name="recovery_alpha_fast"       value="0.0"/>
<param name="initial_pose_x"            value="$(arg initial_pose_x)"/>
<param name="initial_pose_y"            value="$(arg initial_pose_y)"/>
<param name="initial_pose_a"            value="$(arg initial_pose_a)"/>
<remap from="scan"                      to="$(arg scan_topic)"/>

</node>

I have tried other packages such as humanoid_localization which keeps complaining of receiving errorneous occupancy grid maps, or fused /amcl_pose with wheel odometry with robot_localization. I also looked into hector_pose_estimation but concluded that there are no matching topics that I can give to the package. Another option is to replace AMCL with MRPT_localization. MRPT localization node does publish odom and I will look into how to generate map of its format now. Despite this, the rest of my attempts end in failure.
Thus, how do you resolve this kind of localization problem? Or is there an easy or effective way to get around it? Is there any other alternative apart from using AMCL? Thank you !

2021-01-21 00:22:11 -0500 marked best answer Cannot load OMPL global planner plugin

Hi all !

Recently I have been trying other's global planner plug-ins, and I came across this global planner plugin ( https://github.com/windelbouwman/move... ) and keep running into this problem like the following:

[FATAL] [1453693784.973444827, 729.192000000]: Failed to create the ompl_global_planner/OmplGlobalPlanner planner, are you sure it is properly registered and that the containing library is built? Exception: Failed to load library /home/iceira/indigo_ws/devel/lib//libompl_global_planner_lib.so. Make sure that you are calling the PLUGINLIB_EXPORT_CLASS macro in the library code, and that names are consistent between this macro and your XML. Error string: Could not load library (Poco exception = /home/iceira/indigo_ws/devel/lib//libompl_global_planner_lib.so: undefined symbol: _ZNK4ompl4base21OptimizationObjective11isSatisfiedENS0_4CostE)

What should I do? How do I debug it ?

2020-08-08 06:14:47 -0500 received badge  Famous Question (source)
2020-07-20 03:01:02 -0500 edited answer Data type conversion from PCL PointCloud <PointT> to ROS sensor_msgs/Image

In response to @disha 's request, I am sharing my insight to solve such problem, since it is not a trivial one and there

2020-07-20 02:57:08 -0500 edited answer Data type conversion from PCL PointCloud <PointT> to ROS sensor_msgs/Image

In response to @disha 's request, I am sharing my insight to solve such problem, since it is not a trivial one and there

2020-07-20 02:56:41 -0500 edited answer Data type conversion from PCL PointCloud <PointT> to ROS sensor_msgs/Image

In response to @disha 's request, I am sharing my insight to solve such problem, since it is not a trivial one and there

2020-07-20 02:56:19 -0500 edited answer Data type conversion from PCL PointCloud <PointT> to ROS sensor_msgs/Image

In response to @disha 's request, I am sharing my insight to solve such problem, since it is not a trivial one and there

2020-07-20 02:55:35 -0500 edited answer Data type conversion from PCL PointCloud <PointT> to ROS sensor_msgs/Image

In response to @disha 's request, I am sharing my insight to solve such problem, since it is not a trivial one and there

2020-07-20 02:52:22 -0500 edited answer Data type conversion from PCL PointCloud <PointT> to ROS sensor_msgs/Image

In response to @disha 's request, I am sharing my insight to solve such problem, since it is not a trivial one and there

2020-07-20 02:46:12 -0500 answered a question Data type conversion from PCL PointCloud <PointT> to ROS sensor_msgs/Image

In response to @disha 's request, I am sharing my insight to solve such problem\, since it is not a trivial one and ther

2020-07-20 02:23:50 -0500 commented question Data type conversion from PCL PointCloud <PointT> to ROS sensor_msgs/Image

Hi @disha! Thanks for asking. I spent three to four days solving my own problem the hard way and still cannot figure it

2020-07-20 02:13:59 -0500 commented question Data type conversion from PCL PointCloud <PointT> to ROS sensor_msgs/Image

Hi @disha! Thanks for asking. I spent three to four days to resolve my own problem the hard way and still cannot figure

2020-07-20 02:13:38 -0500 commented question Data type conversion from PCL PointCloud <PointT> to ROS sensor_msgs/Image

Hi @disha! Thanks for asking. I spent three to four days to resolve my own problem the hard way and still cannot figure

2020-05-22 14:04:56 -0500 marked best answer Still cannot include library to package from another package

Hi all,

I want to use several libraries created in one package, let say package A, into package B. Both packages' bareboned CMakeLists look like this:

A : The package in which my custom libraries reside:

CMakeLists.txt

cmake_minimum_required(VERSION 2.8.3)
project(A)

catkin_package(
  INCLUDE_DIRS include
  LIBRARIES killer_utils_lib
             haha_lib
  CATKIN_DEPENDS ... <-- just a simplification
  DEPENDS ...
}

include_directories(
  include
  ${catkin_INCLUDE_DIRS}
)

add_library(killer_utils_lib src/killer_utils.cpp )
add_library(haha_lib src/haha.cpp)

target_link_libraries(killer_utils_lib 
  ${catkin_LIBRARIES}
)
target_link_libraries(haha_lib
  ${catkin_LIBRARIES}
)

install(TARGETS
  killer_utils_lib
  haha_lib
  ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
  LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
  RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
  PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
)

install(DIRECTORY include/${PROJECT_NAME}/
  DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
  FILES_MATCHING PATTERN "*.h"
  PATTERN ".svn" EXCLUDE
)

B : The package to which I want to import my custom libraries

CMakeLists.txt

cmake_minimum_required(VERSION 2.8.3)
project(B)

find_package(catkin REQUIRED COMPONENTS
  ...
  killer_utils_lib
  haha_lib
)

catkin_package(
  INCLUDE_DIRS include
  ...
)

include_directories(include)
include_directories(
  ${catkin_INCLUDE_DIRS}
  ${killer_utils_lib_INCLUDE_DIRS}
  ${haha_lib_INCLUDE_DIRS}
)

add_executable(example src/example.cpp)
target_link_libraries(example ${catkin_LIBRARIES} killer_utils_lib haha_lib)

package.xml in B

<build_depend>killer_utils_lib</build_depend>
<build_depend>haha_lib</build_depend>

If I put these two files to compile, The following error messages will pop up:

CMake Warning at /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:76 (find_package):
  Could not find a package configuration file provided by "killers_utils_lib"
  with any of the following names:

    killer_utils_libConfig.cmake
    killer_utils_lib-config.cmake

  Add the installation prefix of "killer_utils_lib" to CMAKE_PREFIX_PATH or
  set "killer_utils_lib_DIR" to a directory containing one of the above
  files.  If "killer_utils_lib" provides a separate development package or
  SDK, be sure it has been installed.
Call Stack (most recent call first):
  task/decision_tasks/CMakeLists.txt:7 (find_package)


-- Could not find the required component 'killer_utils_lib'. The following CMake error indicates that you either need to install the package with the same name or change your environment so that it can be found.
CMake Error at /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
  Could not find a package configuration file provided by "killer_utils_lib"
  with any of the following names:

    killer_utils_libConfig.cmake
    killer_utils_lib-config.cmake

  Add the installation prefix of "killer_utils_lib" to CMAKE_PREFIX_PATH or
  set "killer_utils_lib_DIR" to a directory containing one of the above
  files.  If "killer_utils_lib" provides a separate development package or
  SDK, be sure it has been installed.

My question is, I've followed the steps as given in this ROS Answer article, why do my custom shared libraries killer_utils_lib and haha_lib still not be seen by other packages?

2020-04-26 14:49:41 -0500 received badge  Notable Question (source)
2020-04-26 14:49:41 -0500 received badge  Famous Question (source)
2020-01-09 05:57:39 -0500 received badge  Famous Question (source)
2019-11-21 04:13:31 -0500 received badge  Notable Question (source)
2019-05-20 02:29:38 -0500 marked best answer How to get interactive marker's pose published all the time

Hi all,

I am trying to write a flexible marker to represent a fake charging station to which the robot must approach and dock. For that, I am using interactive marker for the fake device, and I expect it to publish the pose no matter if I clicked, drag, release or not clicking the marker at all. However, what I can do, is to get its pose only via feedback with its own callback function (insert() ). My question is, How can I get my interactive marker to publish its pose not depending on any clicking? Thanks in advance!

My piece of code looks like this:

import math
import copy
import rospy
import tf

from geometry_msgs.msg import Quaternion, PoseStamped, Pose, Point
from interactive_markers.interactive_marker_server import *
from interactive_markers.menu_handler import *
from visualization_msgs.msg import *
from laser_tool.msg import *


class single_station_broadcaster:
    def __init__(self):
        self.server = InteractiveMarkerServer("AutoChargingStation")

        self.pose_pub = rospy.Publisher('charging_station_pose', PoseStamped, queue_size=500)

        self.paramCfg()



def paramCfg(self):
    self.init_x_ = rospy.get_param('~init_x', 0)
    self.init_y_ = rospy.get_param('~init_y', 0)
    self.init_a_ = rospy.get_param("~init_a", 0)
    self.init_a_rad = math.radians(self . init_a_)
    self.global_frame = rospy.get_param('~global_frame', 'map')

def makeBoxControl(self, msg):
    control = InteractiveMarkerControl()
    control.always_visible = True
    control.markers.append(self.makeBox(msg))
    msg.controls.append(control)
    return control

def makeBox(self, msg):
    marker = Marker()

    marker.type = Marker.CUBE
    marker.scale.x = msg.scale * 0.45
    marker.scale.y = msg.scale * 0.45
    marker.scale.z = msg.scale * 0.45
    marker.color.r = 0.0
    marker.color.g = 0.5
    marker.color.b = 0.5
    marker.color.a = 0.5
    return marker

def createMarker(self):
    self.int_marker = InteractiveMarker()
    int_marker = self.int_marker
    int_marker.header.frame_id = self.global_frame
    int_marker.header.stamp = rospy.Time.now()
    int_marker.pose.position.x = self.init_x_
    int_marker.pose.position.y = self.init_y_
    int_marker.pose.position.z = 0.2

    quaternion = tf.transformations.quaternion_from_euler(0, 0, self . init_a_rad)
    int_marker.pose.orientation.x = quaternion[0]
    int_marker.pose.orientation.y = quaternion[1]
    int_marker.pose.orientation.z = quaternion[2]
    int_marker.pose.orientation.w = quaternion[3]

    int_marker.scale = 1

    int_marker.name = "AutoChargingStation"
    int_marker.description = "Charging station"


    self . makeBoxControl(int_marker)
    control = InteractiveMarkerControl()

    # Custom move on plane
    control.orientation.w = 1
    control.orientation.x = 0
    control.orientation.y = 1
    control.orientation.z = 0
    control.interaction_mode = InteractiveMarkerControl.MOVE_PLANE
    int_marker.controls.append(copy.deepcopy(control))

    # make a box which also moves on the plane
    control.markers.append(self . makeBox(int_marker))
    control.always_visible = True
    int_marker.controls.append(copy.deepcopy(control))

    self.server.insert(int_marker, self . publish_pose_callback)

def applyCahnges(self):
    self.server.applyChanges()

def publish_pose_callback(self, feedback):
    # Publish the pose of the charging station
    self.pose = PoseStamped()
    self.pose.header = Header()
    self.pose.header.frame_id = self.global_frame
    self.pose.header.stamp = rospy.Time.now()
    self.pose.pose = Pose()
    self.pose.pose.position = Point()
    self.pose.pose.orientation = Quaternion()

    self.pose.pose.position = feedback.pose.position
    self.pose.pose.orientation = feedback.pose.orientation

    self.pose_pub.publish(self.dummyPose)

 if __name__ == '__main__':
     rospy.init_node('single_charging_station_broadcaster', anonymous=True)

     try:
         chStation = single_station_broadcaster()
         chStation.createMarker()
         chStation.applyCahnges()
     except rospy.ROSInterruptException:
         pass

     rospy . spin()
2018-12-28 20:11:44 -0500 received badge  Famous Question (source)
2018-12-27 02:14:05 -0500 received badge  Popular Question (source)
2018-12-27 02:14:05 -0500 received badge  Notable Question (source)
2018-11-08 02:15:33 -0500 marked best answer Failed to load nodelet

Hi all,

I have been developing a nodelet of my own making reference to kobuki project's safety controller package, however after I have successfully compiled my own package, I get the following error after launching my standalone nodelet manager and load in nodelet. I triple check if I have missed something but couldn't find anything wrong. I need a hand on how to compile a nodelet, HELP !

[ERROR] [1464333474.006836598]: Failed to load nodelet [/beebot_safety_controller] of type       [beebot_safety_controller/SafetyControllerNodelet] even after refreshing the cache: According to the loaded plugin descriptions the class beebot_safety_controller/SafetyControllerNodelet with base class type nodelet::Nodelet does not exist.

I filtered the rest of the irrelevant infos. And here are the essential backbone files of my package: Launch file:

<launch>
  <node pkg="nodelet" type="nodelet" name="nodelet_manager" args="manager" />
  <node pkg="nodelet" type="nodelet" name="beebot_safety_controller" 
    args="load beebot_safety_controller/SafetyControllerNodelet nodelet_manager">
  </node>
</launch>

CMakeLists.txt:

cmake_minimum_required(VERSION 2.8.3)
project(range_proximity_safety_controller)

find_package(catkin REQUIRED COMPONENTS
  nodelet
  pluginlib
  geometry_msgs
  roscpp
  rospy
  std_msgs
)

catkin_package(
  INCLUDE_DIRS include
  LIBRARIES range_proximity_safety_controller_nodelet
  CATKIN_DEPENDS nodelet roscpp rospy std_msgs pluginlib geometry_msgs 
)

include_directories(include
  ${catkin_INCLUDE_DIRS}
)

 add_library(range_proximity_safety_controller_nodelet
   src/safety_controller.cpp
 )
 add_dependencies(range_proximity_safety_controller_nodelet
   ${catkin_EXPORTED_TARGETS}
 )
 target_link_libraries(range_proximity_safety_controller_nodelet
   ${catkin_LIBRARIES}
 )

 install(TARGETS range_proximity_safety_controller_nodelet
   DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
 )

 install(DIRECTORY include/${PROJECT_NAME}/
   DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
 )

  install(DIRECTORY plugins
   DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
 )

package.xml:

<?xml version="1.0"?>
<package>
  <name>range_proximity_safety_controller</name>
  <version>0.0.0</version>
  <description>The range_proximity_safety_controller package</description>

  <buildtool_depend>catkin</buildtool_depend>

  <build_depend>nodelet</build_depend>
  <build_depend>roscpp</build_depend>
  <build_depend>rospy</build_depend>
  <build_depend>std_msgs</build_depend>
  <build_depend>pluginlib</build_depend>
  <build_depend>geometry_msgs</build_depend>  

  <run_depend>nodelet</run_depend>
  <run_depend>roscpp</run_depend>
  <run_depend>rospy</run_depend>
  <run_depend>std_msgs</run_depend>
  <run_depend>pluginlib</run_depend>
  <run_depend>geometry_msgs</run_depend>  

  <export>
    <nodelet pluginlib="${prefix}/plugins/nodelet_plugins.xml" />
  </export>
</package>

plugins/nodelet_plugins.xml:

<library path="lib/libbeebot_safety_controller_nodelet">
  <class name="beebot_safety_controller/SafetyControllerNodelet"
     type="beebot::SafetyControllerNodelet"
     base_class_type="nodelet::Nodelet">
    <description>
      Nodelet for Beebot's safety controller
    </description>  
    </class>
</library>

the header file:

#ifndef _SAFETY_CONTROLLER_H_
#define _SAFETY_CONTROLLER_H_

#include <string>
#include <boost/concept_check.hpp>
#include <boost/graph/graph_concepts.hpp>
#include <ros/ros.h>
#include <std_msgs/Empty.h>
#include <geometry_msgs/Twist.h>
#include <sensor_msgs/LaserScan.h>
#include <stdio.h>

namespace beebot
{
  class SafetyController
  {
  public:
    // some stuff
  private:
    //other stuff
  } ;  // Class definition

} // namespace

#endif

the cpp file:

#include <nodelet/nodelet.h>
#include <pluginlib/class_list_macros.h>
#include "range_proximity_safety_controller/safety_controller.h"


namespace beebot{
  class SafetyControllerNodelet : public nodelet::Nodelet
  {
  public:
      // some stuff
  private:
      // other stuff

  } ; // class
} // namespace

PLUGINLIB_EXPORT_CLASS(beebot::SafetyControllerNodelet, nodelet::Nodelet) ;
2018-08-16 22:05:32 -0500 asked a question Why the callback function binded by message_filters is not working?

Why the callback function binded by message_filters is not working? Hi all, I have referred to several ROS Answers que

2018-07-29 07:55:24 -0500 received badge  Notable Question (source)
2018-07-23 10:46:22 -0500 received badge  Popular Question (source)
2018-07-23 05:32:11 -0500 commented question Is it possible to simulate reflector tapes in ROS-affiliated simulators?

I deleted the duplicate. Sorry that I forgot to logging before posting the question.

2018-07-23 03:31:15 -0500 edited question Is it possible to simulate objects of different RSSI intensities for laser scans?

Is it possible to simulate objects of different RSSI intensity for laser scans? I have been developing a project which d

2018-07-23 03:31:10 -0500 edited question Is it possible to simulate objects of different RSSI intensities for laser scans?

Is it possible to simulate objects of different RSSI intensity for laser scans? I have been developing a project which d

2018-07-23 03:30:09 -0500 asked a question Is it possible to simulate objects of different RSSI intensities for laser scans?

Is it possible to simulate objects of different RSSI intensity for laser scans? I have been developing a project which d

2018-07-23 03:22:40 -0500 asked a question Is it possible to simulate reflector tapes in ROS-affiliated simulators?

Is it possible to simulate reflector tapes in ROS-affiliated simulators? Hi all, I have been developing a project to de

2018-04-04 09:38:26 -0500 received badge  Famous Question (source)
2018-03-31 04:39:28 -0500 received badge  Famous Question (source)
2018-03-27 14:08:14 -0500 received badge  Taxonomist
2018-03-26 13:38:15 -0500 marked best answer How to make custom global planner plugin communicate with local planner?

Hi all,

Recently I have been developing my own global planner plugin for research purpose, but since I adapted source code from 3rd party projects, it turns out to be a collage and I may have miss something. I followed the tutorial Writing a global path planner as plugin in ROS and can successfully compile and plan paths as a goal is given via Rviz. There is no issue on TF frames nor any plugin loading problem, global and local costmap can be loaded and shown on Rviz, except that there is no local costmap update at the local planner side. My question is then, what are the crucial components to make both planners communicate ? Why can't my global planner plugin sends anything at all to the local planner? Where and how can I start digging in? Thank you in advance !

2018-03-20 06:34:59 -0500 received badge  Famous Question (source)