How to import 3D Model COLLADA (.dae) file to RVIZ
Hello,
I am new to ROS and I am having problems importing a 3D Model of a formula car (COLLADA file) i got from 3D warehouse to RVIZ. This is the COLLADA file:
This is my code. It is working for a simple cube as marker. Now I wanted to change the cube to this formula car using the marker type "visualization_msgs::Marker::MESH_RESOURCE"
visualization_msgs::Marker marker;
marker.header.frame_id = "/my_frame";
marker.header.stamp = ros::Time::now();
marker.ns = "myns";
marker.id = k+current_cone_pos.left.x.size()+current_cone_pos.right.x.size()+1;
marker.type = visualization_msgs::Marker::MESH_RESOURCE;
marker.action = visualization_msgs::Marker::ADD;
marker.mesh_resource = "file://models/v1-01/model.dae";
marker.pose.position.x = 0;
marker.pose.position.y = 0;
marker.pose.position.z = 0;
marker.pose.orientation.x = 0.0;
marker.pose.orientation.y = 0.0;
marker.pose.orientation.z = 0.0;
marker.pose.orientation.w = 1.0;
marker.scale.x = 0.1;
marker.scale.y = 0.5;
marker.scale.z = 0.5;
marker.color.b = 0.0f;
marker.color.g = 0.0f;
marker.color.r = 1.0;
marker.color.a = 1.0;
marker.lifetime = ros::Duration();
visualizer_.publish(marker);
The error that i get using "rosrun rviz rviz" while running my C++ Node is:
Could not load resource [file://models/v1-01/model.dae]: Unable to open file "file://models/v1-01/model.dae".
Thank you guys for your support!
Greetings, Alex
Hi, Alex, do you solved this problem?