p3dx urdf model isn't shown correctly in rviz
Hi all,
I am reffering to the question below:
pioneer 3dx simulation using rviz and stage
My problem is the same as described in the other question but the answers did not help me solving it. I am not using amcl because I use the gmapping for the navigation stack to run. Is there a possibility to get those wheels at the right position without using amcl?
I think my big problem is that I am not good at the whole transform and urdf thing. Where can I adjust some things in the model or add for example a kinect to the top of the bot or a laserscanner. In the end I would like to have a complete simulation of my real robot. (I am using a pioneer 3dx with a SICK LMS 200 and a Katana 300 manipulation arm)
EDIT:
Here you can see my TF-tree. The wheels are missing. I think they have an other specification than the other elements of the robot. Where can i change this spec?
This is the urdf-model publisher.cc file. Why are there only 4 joints? Is this a problem? How can I add something?
#include <ros/ros.h>
#include <sensor_msgs/JointState.h>
int main( int argc, char* argv[] )
{
ros::init(argc, argv, "p2os_publisher" );
ros::NodeHandle n;
ros::Publisher joint_state_publisher = n.advertise<sensor_msgs::JointState>("joint_states",1000);
ros::Rate loop_rate(15);
sensor_msgs::JointState js;
js.name.push_back(std::string("base_swivel_joint"));
js.position.push_back(0);
js.name.push_back(std::string("swivel_hubcap_joint"));
js.position.push_back(0);
js.name.push_back(std::string("base_left_hubcap_joint"));
js.position.push_back(0);
js.name.push_back(std::string("base_right_hubcap_joint"));
js.position.push_back(0);
while( n.ok() )
{
js.header.frame_id="/base_link";
js.header.stamp = ros::Time::now();
joint_state_publisher.publish(js);
ros::spinOnce();
loop_rate.sleep();
}
}
This is the launch file (pioneer3dx_urdf.launch):
<launch>
<include file="$(find p2os_urdf)/launch/upload_pioneer3dx.xml"/>
<node pkg="robot_state_publisher" type="state_publisher" name="robot_state_publisher">
<remap from="joint_state" to="joint_state"/>
<param name="publish_frequency" type="double" value="15.0"/>
<param name="tf_prefix" type="string" value=""/>
</node>
<node pkg="p2os_urdf" type="publisher" name="publisher"/>
</launch>
What else do you need?
I am just wondering that I cant find some URDF-specifications in this stack only .xacro-files?! Do you wish to see these files too? Thats a lot of code...