Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nav_msgs/Path Message Problem #32

Open
mhakca opened this issue Apr 6, 2021 · 2 comments
Open

Nav_msgs/Path Message Problem #32

mhakca opened this issue Apr 6, 2021 · 2 comments

Comments

@mhakca
Copy link

mhakca commented Apr 6, 2021

@jstnhuang @jubeira @chapulina
Hi there,

I tried to visualize nav_msgs/path messages on ros-rviz. When i made it on Rviz, there is no problem with visualization. It looks like : https://ibb.co/gyV7pCM However when i tried to visualize it via ros-rviz, lines and markers visualizations' are failing. (https://ibb.co/5rr5w6t) What can cause to that? Any idea how to visualize nav_msgs/Path messages in a proper way ? You can find the code i added for Ros-rviz-path below. I also added related things to ros-rviz.html and ros-rviz-display.html.
rviz
ros-rviz
`

<script> Polymer({ is: 'ros-rviz-path',
  properties: {
    globalOptions: Object,
    isShown: Boolean,
    name: {
      type: String,
      value: 'Path',
    },
    ros: Object,
    tfClient: Object,
    topic: {
      type: String,
      value: '/Visualization_path',
      notify: true,
    },
    viewer: Object,
    _path: {
      type: Object,
      value: null
    },
  },

  observers: [
    '_optionsChanged(viewer, topic, ros)',
  ],

  destroy: function() {
    // Nothing to destroy.
  },

  // TODO: all "destroys" should just be detaches
  detached: function() {
    this.hide();
  },

  hide: function() {
    if (this._path) {
      this._path.unsubscribe();
    }
  },

  show: function() {
    if (this._path) {
     
      
    }
  },

  _optionsChanged: function(viewer, topic, ros) {
    this.hide();
    this._updateDisplay();
  },

  _updateDisplay: function() {
    if (!this.viewer || !this.topic || !this.ros) {
      return;
    }

    var that = this;
    
this._path = new ROS3D.Path({
  ros: this.ros,
  topic: this.topic,
  tfClient: this.tfClient,
  rootObject: this.viewer.scene,
  
});


    
    
  },
});
</script> `
@jubeira
Copy link
Contributor

jubeira commented Apr 6, 2021

Hi @mhakca,

It's a bit hard to tell just by looking at this.
Have you tried checking what RViz does to show the paths? That might give you a clue in case there's any correction to apply.

@mhakca mhakca closed this as completed Apr 6, 2021
@mhakca mhakca reopened this Apr 16, 2021
@mhakca
Copy link
Author

mhakca commented Apr 16, 2021

Hi there, problem is still existing. I saw that there is no problem with path visualization. Situation is that, i need to visualize 4 paths, 2 markers, 1 robot model and 1 marker array messages. I can visualize some combinations without any problems like 2 markers,1 robot model, 1 marker array or 2 paths,1 markers, 1 robot model, 1 marker array etc. When i tried to visualize more than that system becomes problematic. Problem is that everything on screen acts for different times. For example, 1 path message acts the move in 10th second other path message acts the move in 8th second and at the same time marker acts the move in 7th second. What can cause to that problem any idea ? You can see the screenshot of the viewer when it works in proper way with 2 path messages, 1 marker and 1 marker array
NP

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants