Ros wiki:http://wiki.ros.org/Robots/neobotix
robot_description:http://wiki.ros.org/Robots/neobotix/neo_robot_descriptions
使用urdf 在rviz中进行仿真
创建空间
mkdir -p neo_description/src
cd neo_description
catkin_make
. devel/setup.bash
下载编译
cd src
git clone https://github.com/neobotix/neo_robot_descriptions.git
cd neo_robot_description
mkdir launch
cd ../..
catkin_make
. devel/setup.bash
launch 文件夹下添加launch 文件。
mp_400_1.launch
<launch>
<arg name="model" />
<arg name="gui" default="False" />
<param name="robot_description" textfile="$(arg model)" />
<param name="use_gui" value="$(arg gui)"/>
<node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher" ></node>
<node name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher" />
<node name="rviz" pkg="rviz" type="rviz" />
</launch>
启动:
将rviz fixed frame 改为base_link
添加robotmodel 和 TF 框架
roslaunch neo_robot_descriptions mp_400_1.launch model:="`rospack find neo_robot_descriptions`/mp_400/mp_400.urdf"
launch 文件夹下添加launch 文件。
mp_400_2.launch (注意添加urdf的方法)
<launch>
<arg name="model" />
<arg name="gui" default="False" />
<param name="robot_description" textfile="$(find neo_robot_descriptions)/mp_400/mp_400.urdf" />
<param name="use_gui" value="$(arg gui)"/>
<node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher" ></node>
<node name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher" />
<node name="rviz" pkg="rviz" type="rviz" />
</launch>
在rivz 中file -> save config as -> (定位到src/neo_robot_description) mp_400.rviz
完善launch 如下:
<launch>
<arg name="model" />
<arg name="gui" default="False" />
<param name="robot_description" textfile="$(find neo_robot_descriptions)/mp_400/mp_400.urdf" />
<param name="use_gui" value="$(arg gui)"/>
<node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher" ></node>
<node name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher" />
<node name="rviz" pkg="rviz" type="rviz" args="-d $(find neo_robot_descriptions)/mp_400.rviz"/>
</launch>
rostopic list
/clicked_point
/initialpose
/joint_states
/move_base_simple/goal
/rosout
/rosout_agg
/tf
/tf_static
launch3
<launch>
<arg name="model" default="$(find neo_robot_descriptions)/mp_400/mp_400.urdf"/>
<arg name="gui" default="False" />
<param name="robot_description" textfile="$(arg model)" />
<param name="use_gui" value="$(arg gui)"/>
<node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher" ></node>
<node name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher" />
<node name="rviz" pkg="rviz" type="rviz" args="-d $(find neo_robot_descriptions)/mp_400.rviz"/>
</launch>