Giter Club home page Giter Club logo

Comments (5)

m4nh avatar m4nh commented on July 26, 2024

I think it is wrong to compute Current POse in that way. You need to multiply 4x4 matrices in order to obtain the correct position, because in your difference (position - init_pose) you are not taking into account the Roto-Traslation component.

from skimap_ros.

CaptainTrunky avatar CaptainTrunky commented on July 26, 2024

Thank you. It looks like I've nailed it with your help.

from skimap_ros.

fangzhangyun avatar fangzhangyun commented on July 26, 2024

@CaptainTrunky I find you have solved this skimap , I have tried to achieve it , but i failed , Can you help me ? i don't know how to change parameters in the launch file .

from skimap_ros.

CaptainTrunky avatar CaptainTrunky commented on July 26, 2024

@CaptainTrunky I find you have solved this skimap , I have tried to achieve it , but i failed , Can you help me ? i don't know how to change parameters in the launch file .

Could you provide more details? What's exactly wrong when you're running skimap?

from skimap_ros.

fangzhangyun avatar fangzhangyun commented on July 26, 2024

this is my ros_rgbd.cc .
` cv::Mat camera_pose;
camera_pose= mpSLAM->TrackRGBD(cv_ptrRGB->image,cv_ptrD->image,cv_ptrRGB->header.stamp.toSec());

cv::Mat TWC = camera_pose.inv();
cv::Mat RWC= TWC.rowRange(0,3).colRange(0,3);
cv::Mat tWC= TWC.rowRange(0,3).col(3);

tf::Matrix3x3 M(RWC.at<float>(0,0),RWC.at<float>(0,1),RWC.at<float>(0,2),
                RWC.at<float>(1,0),RWC.at<float>(1,1),RWC.at<float>(1,2),
                RWC.at<float>(2,0),RWC.at<float>(2,1),RWC.at<float>(2,2));
tf::Vector3 V(tWC.at<float>(0), tWC.at<float>(1), tWC.at<float>(2));
tf::Quaternion q;
M.getRotation(q);
q.normalize();

tf::Transform transform = tf::Transform(M, V);

static tf::TransformBroadcaster br;
br.sendTransform(tf::StampedTransform(transform,ros::Time(0),"world","camera"));`

this is my skimap_live.launch
`

<arg name="camera" default="camera" />

<node name="skimap_live" output="screen" pkg="skimap_ros" type="skimap_live">

    <!-- Generic Parameters -->
    <param name="hz" value="10" />

    <!-- Topics Parameters -->
    <param name="camera_rgb_topic" value="/camera/rgb/image_color" />
    <param name="camera_depth_topic" value="/camera/depth/image" />

    <!-- Cloud parameters  -->
    <param name="point_cloud_downscale" value="1" />

    <!-- RGB-D Parameters -->
    <param name="fx" value="535.4" />
    <param name="fy" value="539.2" />
    <param name="cx" value="320.1" />
    <param name="cy" value="247.6" />
    <param name="rows" value="480" />
    <param name="cols" value="640" />
    <param name="camera_distance_max" value="3" />
    <param name="camera_distance_min" value="0.45" />

    <!-- Mapping parameters -->
    <param name="base_frame_name" value="world" />
    <param name="camera_frame_name" value="camera" />
    <param name="map_resolution" value="0.05" />
    <param name="min_voxel_weight" value="200" />
    <param name="ground_level" value="0.05" />
    <param name="agent_height" value="1.5" />
    <param name="enable_chisel" value="false" />
    <param name="chisel_step" value="30" />
    <param name="height_color" value="true" />



</node>

<node pkg="rviz" type="rviz" output="screen" name="rviz" args="-d $(find skimap_ros)/rviz/skimap_live.rviz" />
` my bag file is the TUM dataset, and this picture is the result: ![选区_016](https://user-images.githubusercontent.com/39410128/60950316-7f863800-a329-11e9-839d-3f986e91365a.png)

so i think my parameters is bad.

from skimap_ros.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.