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

dreamcase's profile - activity

2022-05-05 15:24:04 -0500 received badge  Famous Question (source)
2021-05-03 08:32:17 -0500 received badge  Famous Question (source)
2019-05-29 05:32:33 -0500 received badge  Famous Question (source)
2018-12-12 23:28:40 -0500 received badge  Famous Question (source)
2018-06-27 06:28:57 -0500 received badge  Famous Question (source)
2018-06-10 03:08:09 -0500 marked best answer navigation yields velocity on Y axis

hi, all,

I am using navigation stack, move_base, for a simple navigation implementation. my base is driven by two differential wheels, and rotates using speed difference between the two driving wheels. i.e. only speed on X axis and rotational speed

from time to time, speed on Y axis is received on "cmd_vel" topic, and the base doesn't know what to do with it. how do I configure the move_base properly so that it generates velocity command that suits my robot base?

   ---
    linear: 
      x: 0.105263157895
      y: 0.0
      z: 0.0
    angular: 
      x: 0.0
      y: 0.0
      z: 0.157894736842
    ---
    linear: 
      x: 0.1
      ***y: -0.1***
      z: 0.0
    angular: 
      x: 0.0
      y: 0.0
      z: 0.0
2018-05-14 03:13:21 -0500 received badge  Popular Question (source)
2018-05-14 03:13:21 -0500 received badge  Notable Question (source)
2018-05-14 03:13:21 -0500 received badge  Famous Question (source)
2017-11-11 18:34:00 -0500 received badge  Famous Question (source)
2017-10-06 07:34:16 -0500 received badge  Good Question (source)
2017-09-13 19:32:14 -0500 marked best answer dynamic_reconfigure function not found during link

Hi,

I am trying to use AMCL for localization. when instantiating AMCLConfig it refers to dynamic_reconfigure package.

so I added following statements in the CMakelists.txt

cmake_minimum_required(VERSION 2.8.3)
include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)
project(agv)
set(EXECUTABLE_OUTPUT_PATH bin)

find_package(catkin REQUIRED COMPONENTS 
message_filters 
laser_geometry 
roscpp 
rospy
geometry_msgs 
std_msgs 
nav_msgs
sensor_msgs
tf2_msgs
actionlib_msgs 
amcl
tf
genmsg 
dynamic_reconfigure
message_generation )

set(Boost_USE_MULTITHREADED ON)
find_package(Boost COMPONENTS thread date_time program_options filesystem system REQUIRED)

rosbuild_add_boost_directories()
find_package(catkin REQUIRED tf)

# dynamic reconfigure
generate_dynamic_reconfigure_options(
    src/navigation_node/cfg/AMCL.cfg
)

###########
include(FindProtobuf)
find_package(Protobuf REQUIRED)
include_directories(${PROTOBUF_INCLUDE_DIR})

find_package(Eigen REQUIRED)
include_directories(${EIGEN_INCLUDE_DIRS})
add_definitions(${EIGEN_DEFINITIONS})
############

## System dependencies are found with CMake's conventions
find_package(Boost REQUIRED COMPONENTS system thread log log_setup program_options)
find_package( Threads )

 add_message_files(
   FILES
   agv.msg
   laser.msg
   lasergeo.msg
   nav_odo.msg
   tf_msg.msg
#   Message1.msg
#   Message2.msg
 )

 generate_messages(
   DEPENDENCIES
   geometry_msgs
   sensor_msgs
   nav_msgs
   std_msgs
   tf2_msgs
 )

catkin_package(
#  INCLUDE_DIRS include ../include ..
#  LIBRARIES beginner_tutorials
  CATKIN_DEPENDS 
  roscpp
  rospy
  std_msgs
  geometry_msgs
  sensor_msgs
  tf2_msgs
  nav_msgs
  message_runtime
  message_filters
  tf
  #dynamic_reconfigure
  DEPENDS system_lib 
  LIBRARIES laser_geometry
  DEPENDS boost Eigen
  #INCLUDE_DIRS include
  LIBRARIES amcl_sensors amcl_map amcl_pf
)

include_directories(include  ${catkin_INCLUDE_DIRS} ../include ../third_party_lib/include)

set(LASER_PATH src/laser_node)
add_executable(Node_laser ${LASER_PATH}/LMS1xx_node.cpp ${LASER_PATH}/LMS1xx.cpp)
add_dependencies(Node_laser laser_generate_cpp)
target_link_libraries(Node_laser   pthread boost_filesystem boost_system log4cpp)
target_link_libraries(Node_laser   ${catkin_LIBRARIES})
#target_link_libraries (Node_laser /opt/ros/hydro/lib/lms1xx/LMS1xx_node )
target_link_libraries(Node_laser
    ${Boost_FILESYSTEM_LIBRARY}
    ${Boost_SYSTEM_LIBRARY}
    ${PROTOBUF_LIBRARY}
)
add_definitions("-std=c++0x -pthread -llog4cpp")

set(LOCALIZATION_PATH src/localization_node)
add_library(laser_geometry ${LOCALIZATION_PATH}/laser_geometry.cpp)
target_link_libraries(laser_geometry ${Boost_LIBRARIES} ${tf_LIBRARIES})
add_executable(Node_localization ${LOCALIZATION_PATH}/main.cpp)
add_dependencies(Node_localization localization_generate_cpp)
target_link_libraries(Node_localization   boost_filesystem boost_system boost_thread log4cpp)
target_link_libraries(Node_localization   ${catkin_LIBRARIES})
target_link_libraries(Node_localization laser_geometry)
target_link_libraries(Node_localization
    ${Boost_FILESYSTEM_LIBRARY}
    ${Boost_SYSTEM_LIBRARY}
    ${PROTOBUF_LIBRARY}
)
add_definitions("-std=c++0x -pthread -llog4cpp -eigen3")

add_library(amcl_pf
                    src/navigation_node/amcl/pf/pf.c 
                    src/navigation_node/amcl/pf/pf_kdtree.c
                    src/navigation_node/amcl/pf/pf_pdf.c
                    src/navigation_node/amcl/pf/pf_vector.c
                    src/navigation_node/amcl/pf/eig3.c
                    src/navigation_node/amcl/pf/pf_draw.c)

add_library(amcl_map
                    src/navigation_node/amcl/map/map.c
                    src/navigation_node/amcl/map/map_cspace.cpp
                    src/navigation_node/amcl/map/map_range.c
                    src/navigation_node/amcl/map/map_store.c
                    src/navigation_node/amcl/map/map_draw.c)

add_library(amcl_sensors
                    src/navigation_node/amcl/sensors/amcl_sensor.cpp
                    src/navigation_node/amcl/sensors/amcl_odom.cpp
                    src/navigation_node/amcl/sensors/amcl_laser.cpp)
target_link_libraries(amcl_sensors amcl_map amcl_pf)
set(NAVI_PATH src/navigation_node)
#include_directories(${catkin_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS})
add_executable(Node_navi ${NAVI_PATH}/amcl_node.cpp)
add_dependencies(Node_navi navi_generate_cpp)
target_link_libraries(Node_navi   amcl_sensors amcl_map amcl_pf pthread boost_filesystem boost_system )
target_link_libraries(Node_navi   ${catkin_LIBRARIES})
target_link_libraries(Node_navi   ${Boost_FILESYSTEM_LIBRARY} ${Boost_SYSTEM_LIBRARY} ${PROTOBUF_LIBRARY} ${Boost_LIBRARIES}  ${CMAKE_THREAD_LIBS_INIT})
add_definitions("-std=c++0x -pthread")

and package dependency in package.xml But, during LINK, the linker always complains not able to find packaged function `dynamic_reconfigure::__init_mutex__'

amcl_node.cpp:(.text._ZN4amcl10AMCLConfig15__get_statics__Ev[amcl::AMCLConfig::__get_statics__()]+0x23): undefined reference to `dynamic_reconfigure::__init_mutex__'

am I missing anything here?

2016-11-07 19:58:34 -0500 received badge  Nice Question (source)
2016-09-29 19:11:56 -0500 received badge  Famous Question (source)
2016-07-22 15:23:44 -0500 received badge  Notable Question (source)
2016-07-22 15:23:44 -0500 received badge  Famous Question (source)
2016-05-08 15:31:47 -0500 marked best answer how to run base_local_planner and dwa_local_planner standalone?

hi, all,

I am trying to run the navigational core move_base separately. there are number of nodes to run before it functions properly.

among them, I cannot find any executable under base_local_planner and dwa_local_planner packages, i.e. I cannot 'rosrun xx_local_planner [executable]'. how to run them as standalone nodes?

thanks

ray

2016-05-08 15:30:54 -0500 marked best answer necessary observation inputs for local costmap generation

hi, All,

in the costmap parameter definition below, are both inputs, laser and point cloud, needed?

observation_sources: laser_scan_sensor point_cloud_sensor
laser_scan_sensor: {sensor_frame: base_laser, data_type: LaserScan, topic: scan, marking: true, clearing: true}
point_cloud_sensor: {sensor_frame: base_laser, data_type: PointCloud, topic: point_cloud, marking: true, clearing: true}

can I have only one? say laser_scan_sensor?

thanks ray

2016-05-08 15:30:19 -0500 received badge  Notable Question (source)
2016-05-08 15:30:19 -0500 received badge  Popular Question (source)
2016-05-08 15:26:06 -0500 marked best answer escape behavior change

hi, all,

on my robot, the escape behaviour in move_base navigation stack is too 'fierce'. the rotation is much too fast.

how can I change it?

rgds

Ray

2016-05-08 15:11:14 -0500 marked best answer pass laser scan to move_base

Hi, all,

I am calling move_base to navigate my robot, by calling "rosrun move_base move_base _global_costmap/global_frame:=world".

move_base Diagram

But I could not find the parameter to define the laser_scan input topic and odometry topic. How do I pass these two parameters? I scan thru move_base.cpp, but cannot find any clue.

all comment appreciated! thanks

Ray

2016-05-08 15:05:24 -0500 marked best answer How to Construct a Broadcaster for this listener?

Hi, All,

I am trying to interface with the code below. this is a piece of TF listener code trying to convert the incoming laser scan data to base_frame. How do I construct a broadcaster for it?

tf::Stamped<tf::Pose> ident (tf::Transform(tf::createIdentityQuaternion(),
                                         tf::Vector3(0,0,0)),
                             ros::Time(), laser_scan->header.frame_id);
tf::Stamped<tf::Pose> laser_pose;
try
{
  this->tf_->transformPose(base_frame_id_, ident, laser_pose);
}
catch(tf::TransformException& e)
{
  ROS_ERROR("Couldn't transform from %s to %s, "
            "even though the message notifier is in use",
            laser_scan->header.frame_id.c_str(),
            base_frame_id_.c_str());
  return;
}
2016-05-08 15:04:48 -0500 marked best answer Laser -> point cloud, tf drop all packages

hi, all,

I am super new to ROS. I am trying to use tf to transform the laser input to tf base_link frame. But I am constantly getting error msg like "MessageFilter [target=base_link ]: Dropped 100.00% of messages so far. Please turn the [ros.agv.message_notifier] rosconsole logger to DEBUG for more information." and it seems the call back was never invoked. I tested the laser msg by subscribing to the raw msg and it works fine. I think there might be a broken link somewhere in the settings. Can someone help me? here's the code for the listener.

class LaserScanToPointCloud{
public:
  ros::NodeHandle node;
  laser_geometry::LaserProjection projector;
  tf::TransformListener listener;
  message_filters::Subscriber<sensor_msgs::LaserScan> laser_sub;
  tf::MessageFilter<sensor_msgs::LaserScan> laser_notifier;
  ros::Publisher scan_pub;
  LaserScanToPointCloud(ros::NodeHandle n) :
    node(n),
    laser_sub(node, "base_scan", 10),
    laser_notifier(laser_sub,listener, "base_link", 10)
  {
      printf("setting up callback\r\n");
      laser_notifier.registerCallback(boost::bind(&LaserScanToPointCloud::scanCallback, this, _1));
      laser_notifier.setTolerance(ros::Duration(0.01));
      scan_pub = node.advertise<sensor_msgs::PointCloud>("my_cloud",1);
      printf("set up callback\r\n");
  }
  void scanCallback (const sensor_msgs::LaserScan::ConstPtr& scan_in)
  {
    sensor_msgs::PointCloud localcloud;
    printf("%ds:%lfm\r\n",scan_in->header.stamp.sec,scan_in->ranges[128]);
    try
    {
        projector.transformLaserScanToPointCloud("base_link",*scan_in, localcloud,listener);
    }
    catch (tf::TransformException& e)
    {
        std::cout << e.what();
        return;
    }
    printf("(%f,%f,%f)\r\n",localcloud.points.data()->x,localcloud.points.data()->y,localcloud.points.data()->z);
    // Do something with cloud.
    scan_pub.publish(localcloud);
  }
};
int main(int argc, char** argv)
{
  ros::init(argc, argv, "my_scan_to_cloud");
  ros::NodeHandle n;
  LaserScanToPointCloud lstopc(n);
  ros::spin();
  return 0;
}

and here's the broadcaster

int main(int argc, char** argv){
  ros::init(argc, argv, "robot_tf_publisher");
  ros::NodeHandle n;
  ros::Rate r(50);
  tf::TransformBroadcaster broadcaster;
  while(n.ok()){
      broadcaster.sendTransform(
              tf::StampedTransform(
                      tf::Transform(tf::Quaternion(0, 0, 0, 1), tf::Vector3(0.0, 0.0, 0.2)),
                      ros::Time::now(),"base_link", "base_scan"));
      r.sleep();
  }
  return 0;
}

million thanks Ray

2016-05-05 10:31:55 -0500 marked best answer robot clearance from walls

hi, all,

I have been testing my robot for a while. there's a problem persists. the global plan would put the path along and close to the wall. especially at the corners, each time at the corners, my robot feels it's too close to the wall (I can see if from rviz), and initiates escape behaviour.

is there a way to move the path away from the walls? I am using default move_base global planner. or, does it help if I inflate the global cost map further? which parameter should I manipulate?

regards Ray

2016-01-31 15:30:11 -0500 received badge  Taxonomist
2016-01-19 12:04:05 -0500 received badge  Famous Question (source)
2015-12-10 13:30:13 -0500 received badge  Famous Question (source)
2015-09-29 09:23:14 -0500 received badge  Famous Question (source)
2015-09-23 20:09:58 -0500 received badge  Famous Question (source)
2015-06-02 09:55:25 -0500 received badge  Famous Question (source)
2015-06-01 18:34:49 -0500 received badge  Famous Question (source)
2015-04-21 08:33:03 -0500 received badge  Famous Question (source)
2015-03-28 21:11:49 -0500 received badge  Famous Question (source)
2015-03-23 06:21:34 -0500 received badge  Famous Question (source)
2015-03-23 02:30:18 -0500 marked best answer local cost map not updated

Hi, All,

I am using a 6m laser range finder to generate local cost map. (Hokuyo URG). I found the the local cost map was not updated promptly.

what happens is that, whenever an obstacle occurs in the range. an inflated object is generated in the local cost map. however, after it disappears, the inflated object remains there for a very long time.

I have set the cost map update frequency to 10Hz. but it does not seems to help. any other suggestion?

I have an unverified postulation here. on the actual laser packets received, after the obstacle disappears, the range readings at that particular points becomes 0 or NaN. somehow cost_map_2D keeps the old data if the particular beam is 0.

thanks

ray

2015-03-18 01:29:06 -0500 received badge  Notable Question (source)
2015-03-18 01:29:06 -0500 received badge  Popular Question (source)
2015-03-16 03:13:23 -0500 received badge  Famous Question (source)
2015-01-07 12:11:45 -0500 received badge  Notable Question (source)
2014-12-31 13:59:26 -0500 received badge  Famous Question (source)
2014-12-24 19:35:02 -0500 received badge  Famous Question (source)
2014-12-12 09:17:58 -0500 received badge  Notable Question (source)
2014-12-10 13:22:32 -0500 received badge  Notable Question (source)
2014-11-18 23:55:08 -0500 received badge  Notable Question (source)