ClaudiaAlvarezAparicio / petra

GNU Lesser General Public License v3.0
22 stars 3 forks source link

Marker Array display issue in rviz #1

Closed sapanakhemkar closed 4 years ago

sapanakhemkar commented 4 years ago

Hi I was trying petra package for study and understanding. I have followed readme and downloaded/compiled petra package. I am trying petra_rosbag.launch with your kitchen1.bag file. Here are steps I followed

  1. Open terminal- 1, roscore
  2. Open terminal-2, rosrun rviz rviz
  3. Open terminal-3, roslaunch petra petra_rosbag.launch rosbag_file:=/home/user/catkin_ws/kitchen1.bag Petra started successfully, but failed to show marker on rviz. See image below for error. Screenshot from 2020-05-20 16-45-56 I tried same in docker image which you have provided and found it working fine. Is there some extra setting which needs to be done on local machine? Can you please help?

Thanks, Sapana

ClaudiaAlvarezAparicio commented 4 years ago

Hi,

First of all, thank you so much for test my package :)

Second, if you run "rostopic echo /people" you can see the data in the terminal?

Only with this information, I am not sure but it could be possible that the "Fixed frame" in "Global Options" is not set properly. It is needed that the "Fixed Frame" was the same that the LIDAR frame. For the rosbags kitchen1.bag the frame is "front_laser_base_link".

Here the default config of Rviz used in the docker image. (remove .txt expension) default.rviz.txt

Please let me know if it works or not. To search for more solutions.

Thanks, Claudia

sapanakhemkar commented 4 years ago

Hi Claudia, Thanks for quick response. I tried rostopic echo /people, its empty as below

header: 
  seq: 27
  stamp: 
    secs: 0
    nsecs:         0
  frame_id: ''
people: []

Also I tried rostopic echo /marker and output is as below

markers: 
  - 
    header: 
      seq: 0
      stamp: 
        secs: 0
        nsecs:         0
      frame_id: ''
    ns: "leg"
    id: 150
    type: 2
    action: 0
    pose: 
      position: 
        x: 10.1917533875
        y: 5.09294128418
        z: 0.0
      orientation: 
        x: 0.0
        y: 0.0
        z: 0.0
        w: 0.0
    scale: 
      x: 0.1
      y: 0.1
      z: 0.1
    color: 
      r: 0.0
      g: 0.0
      b: 1.0
      a: 1.0
    lifetime: 
      secs: 0
      nsecs: 200000000
    frame_locked: False
    points: []
    colors: []
    text: ''
    mesh_resource: ''
    mesh_use_embedded_materials: False

In my set up I did not find frame is "front_laser_base_link". Laser scan frame_id is "hokuyo_laser_link". I tried changing rviz Fixed Frame to "hokuyo_laser_link". But still same issue. In marker message Header timestamp is 0 and frame_id is also blank.

Thanks, Sapana

ClaudiaAlvarezAparicio commented 4 years ago

Hi,

You are right, the fixed frame is "hokuyo_laser_link". The problem could be that you have the timestamp and frame_id empty. I don't know why... I have just cloned and compiled the git and it works properly. In the Dockerfile used to create the image that you were tested not extra setting is needed. With which ROS version are you working? And what installation are you done? desktop-full or other? If you don't use desktop-full installation, maybe you need some dependencies (but I am not sure).

When I run with the rosbag kitchen1.bag (all the rosbags are available in this link: https://drive.google.com/open?id=1VVUJWUrG2qqeD7QOQyxzEGNHSfvsnRsG, please request access) and the following configuration (remove .txt): default.rviz.txt

I can see the data in Rviz and the rostopic echo:

/people topic:

header: 
  seq: 196
  stamp: 
    secs: 1549390928
    nsecs: 906771000
  frame_id: ''
people: 
  - 
    header: 
      seq: 0
      stamp: 
        secs: 1549390928
        nsecs: 906771000
      frame_id: "/hokuyo_laser_link"
    name: "person_0"
    position_person: 
      x: 0.536555811763
      y: 0.100364993326
      z: 0.0
    leg1: 
      header: 
        seq: 0
        stamp: 
          secs: 0
          nsecs:         0
        frame_id: "/hokuyo_laser_link"
      name: "leg1"
      position: 
        x: 0.61183321476
        y: 0.185751348734
        z: 0.0
    leg2: 
      header: 
        seq: 0
        stamp: 
          secs: 0
          nsecs:         0
        frame_id: "/hokuyo_laser_link"
      name: "leg2"
      position: 
        x: 0.461278408766
        y: 0.0149786379188
        z: 0.0
    reliability: 0.0

/markers topic:

markers: 
  - 
    header: 
      seq: 0
      stamp: 
        secs: 1549390928
        nsecs: 906771000
      frame_id: "/hokuyo_laser_link"
    ns: "person_0"
    id: 0
    type: 9
    action: 0
    pose: 
      position: 
        x: 0.536555811763
        y: 0.100364993326
        z: 0.0
      orientation: 
        x: 0.0
        y: 0.0
        z: 0.0
        w: 0.0
    scale: 
      x: 0.15
      y: 0.15
      z: 0.15
    color: 
      r: 0.0
      g: 0.0
      b: 1.0
      a: 1.0
    lifetime: 
      secs: 0
      nsecs: 200000000
    frame_locked: False
    points: []
    colors: []
    text: "person_0"
    mesh_resource: ''
    mesh_use_embedded_materials: False
  - 
    header: 
      seq: 0
      stamp: 
        secs: 1549390928
        nsecs: 906771000
      frame_id: "/hokuyo_laser_link"
    ns: "person_0"
    id: 50
    type: 2
    action: 0
    pose: 
      position: 
        x: 0.61183321476
        y: 0.185751348734
        z: 0.0
      orientation: 
        x: 0.0
        y: 0.0
        z: 0.0
        w: 0.0
    scale: 
      x: 0.1
      y: 0.1
      z: 0.1
    color: 
      r: 1.0
      g: 0.0
      b: 0.0
      a: 1.0
    lifetime: 
      secs: 0
      nsecs: 200000000
    frame_locked: False
    points: []
    colors: []
    text: ''
    mesh_resource: ''
    mesh_use_embedded_materials: False
  - 
    header: 
      seq: 0
      stamp: 
        secs: 1549390928
        nsecs: 906771000
      frame_id: "/hokuyo_laser_link"
    ns: "person_0"
    id: 100
    type: 2
    action: 0
    pose: 
      position: 
        x: 0.461278408766
        y: 0.0149786379188
        z: 0.0
      orientation: 
        x: 0.0
        y: 0.0
        z: 0.0
        w: 0.0
    scale: 
      x: 0.1
      y: 0.1
      z: 0.1
    color: 
      r: 1.0
      g: 0.0
      b: 0.0
      a: 1.0
    lifetime: 
      secs: 0
      nsecs: 200000000
    frame_locked: False
    points: []
    colors: []
    text: ''
    mesh_resource: ''
    mesh_use_embedded_materials: False
sapanakhemkar commented 4 years ago

Finally I deleted my catkin_ws and then followed all steps again. Now issue is solved. Thanks for all support.