LdwgWffnschmdt / vue-ros3djs

Vue components for ros3djs
MIT License
15 stars 11 forks source link

Can not show /map and /scan topic #1

Closed TriKnight closed 4 years ago

TriKnight commented 4 years ago

Hi! Thank for open the code vue-ros3djs. I am following your instruction but get stuck when I try to subscribe topics /map and /scan, the 3D viewer does not show anything. But all the topic have already published via websocket. rqt_graph 3D Map show My code

<template>
<div class="VueRos3djsDemo">
 <ros3d-viewer
    :ros="ros"
    ref="viewer" id="viewer"
    @hook:mounted="rosViewerMounted" 
    v-if="connected">

    <ros3d-axes />

    <ros3d-grid :numCells = '10' />
    <ros3d-arrow :x ="1" :y="1" :z="1"/>
    <ros3d-occupancy-grid-client />
    <ros3d-laser-scan />
  </ros3d-viewer  >
  </div>
</template>

All the topic available in the list bellow

/client_count
/connected_clients
/map
/map_metadata
/rosout
/rosout_agg
/scan
/statistics
/tf2_web_republisher/cancel
/tf2_web_republisher/feedback
/tf2_web_republisher/goal

Could you help me! Many thanks.

LdwgWffnschmdt commented 4 years ago

It is possible, that you need to have the transforms topic /tf published. The <ros3d-viewer> takes an argument called fixedFrame that defaults to /map as base frame for all transforms. Try publishing the transforms as well and maybe adjust that fixed frame.

TriKnight commented 4 years ago

Thank for your support, I did it. Bes regards