Comments (5)
Hi @hyunoklee
This software has one limitation: you must use a framework whose X-axis is oriented towards the scene.
I would use base_footprint as the working frame, and transform the center to "map", with something like this (I have not compiled this!!!, use it only as reference):
// The input is BoundingBoxes3d msg;
BoundingBox3d point_msg = msg[0];
tf2::Vector3 point;
point.setX( (point_msg.xmax + point_msg.xmin) / 2.0 );
point.setY( (point_msg.ymax + point_msg.ymin) / 2.0 );
point.setZ( (point_msg.zmax + point_msg.zmin) / 2.0 );
geometry_msgs::TransformStamped p2map_msg;
tf2::Transform p2map;
std::string error;
if (tfBuffer_.canTransform(point_msg.header.frame_id, "map", ros::Time(0), ros::Duration(0.1), &error))
p2map_msg = tfBuffer_.lookupTransform(point_msg.header.frame_id, "map", ros::Time(0));
else
{
ROS_ERROR("Can't transform %s", error.c_str());
return;
}
tf2::convert(p2map_msg, p2map);
tf2::Vector3 point_in_map = (p2map).inverse() * point;
Hope it helps!!!
from gb_visual_detection_3d.
thank you ~
from gb_visual_detection_3d.
Hi @fmrico, in which part should I integrate this code? Darknet3d.cpp or darknet3DListener.cpp?
from gb_visual_detection_3d.
from gb_visual_detection_3d.
Hello, @gokcesena . I supose you have a node which subscribes to the darknet_ros_3d output. You only need to add some code to that node in order to transform the x,y,z coordinates to the map frame. You should use tf or tf2.
To sum up, the coordinates of the 3d bounding boxes can be changed to any frame AFTER their calculation (many documentation about coordinates transformation is available on internet), so don't change de working_frame parameter of the yaml file.
from gb_visual_detection_3d.
Related Issues (20)
- std::out_of_range HOT 2
- Any rosbag with intel realsense camera topics available for test ??
- Why is it important to use "depth_registered/points" topic instead of "depth/points" ?
- c++: internal compiler error: Segmentation fault (program cc1plus) HOT 5
- No bounding boxes published HOT 1
- some question about gb_visual_detection_3d_msgs? HOT 1
- I want use in gazebo...but I got 'std::out_of_range' error HOT 1
- error: no matching function for call to ‘tf2_ros::Buffer::lookupTransform(std::cxx11::string&, std_msgs::msg::Header<std::allocator >::frame_id_type&, std_msgs::msg::Header<std::allocator >::stamp_type&, tf2::Duration)’ point_cloud.header.stamp, tf2::durationFromSec(2.0)); HOT 5
- Ros Galactic topic camera\depth\registered\point with qos-reliability best-effort HOT 1
- Can I use this package without darknet_ros (2d) ? HOT 2
- Error on catkin_make HOT 3
- Is it possible to visualize tf of the object relative to camera? HOT 1
- Cannot load message class for [gb_visual_detection_3d_msgs/BoundingBoxes3d]
- Why the orientation is the same? HOT 2
- Marker is not at the center of boundingboxes3D
- Why sometimes bounding box marker doesn't appear in rviz? HOT 2
- several errors HOT 5
- for yolov7_ros HOT 1
- Advice to use USB Camera+LIDAR instead of RGB-D camera?
- Quick Start >Instalation>catkin_make Error HOT 2
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 gb_visual_detection_3d.