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

RalphA's profile - activity

2020-05-11 07:54:57 -0500 received badge  Student (source)
2014-10-07 10:55:19 -0500 received badge  Famous Question (source)
2014-06-19 08:53:36 -0500 received badge  Notable Question (source)
2014-06-18 13:42:19 -0500 received badge  Popular Question (source)
2014-05-28 17:32:37 -0500 received badge  Editor (source)
2014-05-28 17:30:33 -0500 asked a question Callback of actionlib_msgs::GoalStatusArray fails

Hi,

I am writing a node that subscribes to an actionlib_msgs::GoalStatusArray message. The callback code is:

  move_base_status_sub = n.subscribe<actionlib_msgs::GoalStatusArray>("/move_base/status", 50, &rviz_text::move_base_statusCallback, this);

...

void rviz_text::move_base_statusCallback(const actionlib_msgs::GoalStatusArrayConstPtr& msg)
{
  actionlib_msgs::GoalStatusArray status_array = *msg;   
  uint32_t sequence = status_array.header.seq;
  // sequence is read successfully 

  actionlib_msgs::GoalStatus status_list_entry = status_array.status_list[0]; 
  // status_list_entry is read unsuccessfully. The above line causes a seg fault at runtime. 
}

I am able to read the header of the GoalStatusArray, but unable to read the status_list array. I get a segmentation fault when doing so.

I seem to be doing an error when trying to access the first element of status_array.status_list. Do you see any syntax error in my code?

The GoalStatusArray and GoalStatus messages definitions can be found on:

GoalStatusArray message

GoalStatus message

My callback function is subscribing to the /move_base/status topic. The messages on this topic look like the following:

---
header: 
  seq: 52
  stamp: 
    secs: 1400564326
    nsecs: 841550350
  frame_id: ''
status_list: 
  - 
    goal_id: 
      stamp: 
        secs: 1400564318
        nsecs: 321941901
      id: /move_base-1-1400564318.321941901
    status: 1
    text: This goal has been accepted by the simple action server
---

My setup:

  • ROS fuerte
  • Ubuntu 12.04

Do you have a clue why my code is failing?

2014-05-28 17:00:12 -0500 received badge  Famous Question (source)
2014-03-09 00:35:11 -0500 received badge  Self-Learner (source)
2014-03-09 00:35:11 -0500 received badge  Teacher (source)
2014-03-02 19:07:12 -0500 answered a question How to use humanoid_localization with stereo cameras?

I managed to get rid of the issue.

I was using the following parameter setting:

<param name="base_frame_id" value="/base_link" />

By setting the base_frame_id to any other frame not coinciding with /base_link, the issue could be fixed.

For my system, the /base_link lies on the map ground level. However, the ground level does not seem to be the issue. I initialized the system with /base_link lying above and below ground level and I was still getting the error

ERROR: Raycasting in direction (0,0,0) is not possible!

It seems like another property of /base_link was causing the issue.

2014-03-02 18:09:40 -0500 received badge  Enthusiast
2014-02-24 12:33:28 -0500 received badge  Notable Question (source)
2014-02-20 11:33:55 -0500 received badge  Popular Question (source)
2014-02-19 18:27:09 -0500 asked a question How to use humanoid_localization with stereo cameras?

Hi,

I started using the humanoid_localization node for localizing my robot using stereo cameras. I give the node a sensor_msgs/PointCloud2 as input, but I don't provide any sensor_msgs/LaserScan. According to the humanoid_localization wiki page, this setup should be fine.

I am able to run the node and the particle filter is working, but for every particle filter update, the following error gets printed on the console hundreds of times:

ERROR: Raycasting in direction (0,0,0) is not possible!

The error message is generated when calling the castRay function in the file humanoid_localization/src/RaycastingModel.cpp.

What am I missing to have the node running without errors? Do I need to create a "fake" LaserScan message from my stereo image data to get rid of the errors? Do I need to change the parameter setting in my launch file?

Reading a paper from the authors of the humanoid_localization algorithms, I found out that they implemented a setup similar to mine using a depth camera. So the code has been used with cameras only, but I could not find out which adaptations were necessary. See:

Maier, D.; Hornung, A.; Bennewitz, M., "Real-time navigation in 3D environments based on depth camera data," Humanoid Robots (Humanoids), 2012 12th IEEE-RAS International Conference on , vol., no., pp.692,697, Nov. 29 2012-Dec. 1 2012

My setup:

  • ROS fuerte
  • Ubuntu 12.04
  • stereo cameras fixed on wheeled robot

Extract of my launch file:

        <!-- Load map from octomap_server -->
    <node pkg="octomap_server" type="octomap_server_node" name="octomap_server"
    args="$(find nav)/maps/3D/track3_2014-02-18_image_proc_pc_tallmap.bt" output="screen" >
    </node>

    <!-- Localization -->
    <node pkg="humanoid_localization" type="localization_node" name="humanoid_localization" output="screen" >
        <remap from="point_cloud" to="/stereo_odometer/point_cloud" />      
        <param name="odom_frame_id" value="/odom" />
        <param name="base_frame_id" value="/base_link" />
        <param name="global_frame_id" value="/map" />
        <param name="num_particles" value="2000" />
        <param name="use_raycasting" value="true" />    
        <param name="use_imu" value="false" />
        <param name="base_footprint_id" value="/base_link" />
    </node>

EDIT: (for AHornung's answer)

I was using humanoid_navigation code downloaded from the APT repo ros-fuerte-humanoid-navigation. Now, I downloaded the recent version of humanoid_navigation from GitHub, ran the humanoid_localization node and had the same issues as before.

The point cloud input for the humanoid_localization node has no NaNs. I am not sure what other values could be invalid as input... could points in the origin (0,0,0) cause the error?

The width of my point cloud is 1 and the height is unequal to 1, so it seems to be ordered.

An extract of my console output:

core service [/rosout] found
process[saved_map/octomap_server-1]: started with pid [26692]
[ INFO] [1392965933.527639300]: Publishing latched (single publish will take longer, all topics are prepared)
[ INFO] [1392965933.601608621]: Octomap file /home/aes002/fuerte_workspace/sandbox/trunk/gator/nav/maps/3D/track1_2014-02-18_image_proc_pc.bt loaded (772778 nodes).
process[saved_map/humanoid_localization-2]: started with pid [26763]
[ INFO] [1392965933.779107102]: Requesting the map from /saved_map/humanoid_localization/octomap_binary...
[ INFO] [1392965933.848516881, 1392354124.777533329]: Sending binary map data on service request
process[saved_map/rviz-3]: started with pid [26867]
[ INFO] [1392965933.963886245]: Occupancy map initialized with 772778 nodes ...
(more)