Comments (15)
@BrunoEduardoCSantos please post a screenshot when you resolve the problem (because i'm sure you will resolve it :) ) just for other user .. thanks a lot
from skimap_ros.
hi @BrunoEduardoCSantos, SkiMap works with any type of 3D data, given that is a generic 3D Indexing Data Structure. In the Basic Tutorial is explained how to integrate a generic 3D information in SkiMap (without a direct ROS integration).
from skimap_ros.
Thanks @m4nh for your feedback .
Once I subscribe a topic from the registered point cloud coming from a SLAM algorithm, I can use this basic tutorial to integrate as SkiMap, right?
from skimap_ros.
@BrunoEduardoCSantos yes sure
from skimap_ros.
Hi @BrunoEduardoCSantos ,
Currently, I am trying to get skimap viz on rviz using as example you skipmap_live.
Although, instead rgb-d data, I am using PointXYZI. After getting the visualization in rviz the voxel colors were a mixed of colors which doesnt make sense at all.
My code to integrate the point cloud is the following:
for(int i=0; i<pc->points.size();i++){
double x = pc->points[i].x;
double y = pc->points[i].y;
double z = pc->points[i].z;
//store voxel
VoxelDataColor voxel;
voxel.r = 0.1;
voxel.g = 0.1;
voxel.b = 0.1;
voxel.w = 1.
map_->integrateVoxel(CoordinateType(x), CoordinateType(y),
CoordinateType(z), &voxel);
}
Is there anyway of doing using intensity to assign the voxel color?
Regards,
Bruno
from skimap_ros.
hi @BrunoEduardoCSantos ! can you send me a screeshot of the visualization?
from skimap_ros.
@BrunoEduardoCSantos I think you set the launch parameter
to TRUE. With this parameter enabled the coloration is based on the Z value of each voxel... it is just a demonstration for maps with the Z oriented like gravity. Try to set the parameter to FALSE
from skimap_ros.
from skimap_ros.
I create my own node . I am not using really the skimap_live. Just a version of it.
void SkimapPathPlanning::fillVisualizationMarkerWithVoxels(
visualization_msgs::Marker &voxels_marker, std::vector<Voxel3D> &voxels) {
cv::Mat colorSpace(1, voxels.size(), CV_32FC3);
// if (mapParameters.height_color) {
for (int i = 0; i < voxels.size(); i++) {
colorSpace.at<cv::Vec3f>(i)[0] = 180 - (voxels[i].z / 2) * 180;
colorSpace.at<cv::Vec3f>(i)[1] = 1;
colorSpace.at<cv::Vec3f>(i)[2] = 1;
}
cv::cvtColor(colorSpace, colorSpace, CV_HSV2BGR);
// }
for (int i = 0; i < voxels.size(); i++) {
/**
* Create 3D Point from 3D Voxel
*/
geometry_msgs::Point point;
point.x = voxels[i].x;
point.y = voxels[i].y;
point.z = voxels[i].z;
/**
* Assign Cube Color from Voxel Color
*/
std_msgs::ColorRGBA color;
// if (mapParameters.height_color) {
color.r = colorSpace.at<cv::Vec3f>(i)[2];
color.g = colorSpace.at<cv::Vec3f>(i)[1];
color.b = colorSpace.at<cv::Vec3f>(i)[0];
// } else {
// color.r = float(voxels[i].data->r) / 255.0;
// color.g = float(voxels[i].data->g) / 255.0;
// color.b = float(voxels[i].data->b) / 255.0;
// }
color.a = 1;
voxels_marker.points.push_back(point);
voxels_marker.colors.push_back(color);
}
}
Since I want a height map, is this the way to do it?
Thanks again.
from skimap_ros.
Yes you commented:
// color.r = float(voxels[i].data->r) / 255.0;
// color.g = float(voxels[i].data->g) / 255.0;
// color.b = float(voxels[i].data->b) / 255.0;
so you are using the colors contained in the vector colorSpace
. But maybe your map has the Z axis not oriented with gravity.. try to modify the row containing:
colorSpace.at<cv::Vec3f>(i)[0] = 180 - (voxels[i].z / 2) * 180;
by replacing .z
with .x
or .y
.. just to debug the issue..
from skimap_ros.
It worked just replacing by .y . Thanks for your help!
from skimap_ros.
But it still has some noisy data.
from skimap_ros.
by noisy I mean non related color data.
from skimap_ros.
@BrunoEduardoCSantos .. sorry but the skimap_live is just a prototype for demo purposes :) ... however when you set:
colorSpace.at<cv::Vec3f>(i)[0] = 180 - (voxels[i].y / 2) * 180;
you are codifying the HUE of the color.. in this equation the max allowed y is obviously between [0,2].. probably negative values are creating noisy data... try to change this function for your custom purposes.. maybe managing negative numbers, changing the maximum range (>2) and so on..
from skimap_ros.
Thanks @m4nh for your help. I will custom this parameter according to your suggestions.
Thanks a lot.
from skimap_ros.
Related Issues (20)
- Cannot show the octomap HOT 2
- error about slamdunk_tracker.launch HOT 2
- 3D mapping result is weired HOT 4
- Local_robot_map HOT 3
- Global Status:Fixed Frame No tf data. Actual error: Fixed Frame [odom] does not exist HOT 3
- Clear occupied space HOT 2
- Implementation on quadrotor HOT 2
- Stack corruption on insert (when compiled under Windows/VS2017) HOT 4
- Pose together with Points integration into the map HOT 2
- Iterate over occupancy in map cells HOT 2
- 2D grid visualization HOT 1
- SIGDEV running skimap_live HOT 8
- 2.5 D Map HOT 1
- Tiles 2D visualization
- Skimap with synthetic data HOT 5
- savetofile for HOT 4
- How to Saving Map ? HOT 1
- How can i get the octomap? HOT 1
- The tiago_lar.bag does not exist HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from skimap_ros.