ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

how change turtlebot bring minimal.launch to use

asked 2014-04-21 15:46:59 -0500

Yantian_Zha gravatar image

Hi everyone, I have a turtlebot2, Groovy, Phantomx Pincher arm. I mounted the pincher arm on turtlebot by rewriting file "turtlebot_description/urdf/graveyard/turtlebot.urdf.xacro". But firstly I don't know how to visualise my model(by Rviz), and secondly to grasp things I need to publish TF based on this new model urdf. But after reading turtlebot bringup's minimal.launch I'm confused in how to do it? I didn't found such sentence like , which is beyond my imagine. I appreciate your help if you can teach me how to change the minimal.launch file(or other methods that can get the same outcomes)!

edit retag flag offensive close merge delete

Comments

I have added hokuyo sensor to turtlebot2 model and have changed position of kinect to on the top plate. In my case, I edited minimal.launch, hexagon.urdf.xacro in /turtlebot_description/urdf/stacks and so on.

Ken_in_JAPAN gravatar image Ken_in_JAPAN  ( 2014-04-21 16:42:44 -0500 )edit

Thanks so much. I know the way to editing .urdf.xacro of certain components, such as your hexagon, but in researching minimal.launch I still don't know where should I edit? Note that the second "include file" points to _robot.launch, should I edit _robot.launch? _robot.launch still confused me.

Yantian_Zha gravatar image Yantian_Zha  ( 2014-04-21 16:52:04 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-04-21 17:51:10 -0500

Ken_in_JAPAN gravatar image

I want you to read this contents as a reference. This might be good answer. I wrote following sentences in minimal.launch

  < arg name="base"       default="$(optenv TURTLEBOT_BASE kobuki)"/ >
  < arg name="battery"    default="$(optenv TURTLEBOT_BATTERY /sys/class/power_supply/BAT0)"/ >
  < arg name="stacks"     default="$(optenv TURTLEBOT_STACKS hexagons)"/ >
  < arg name="3d_sensor"  default="$(optenv TURTLEBOT_3D_SENSOR kinect)"/ >
  < arg name="sensor"          default="$(optenv TURTLEBOT_SENSOR hokuyo)"/ > 
  < arg name="simulation" default="$(optenv TURTLEBOT_SIMULATION false)"/ >
  < arg name="tf_prefix" default="" / >

  < param name="/use_sim_time" value="$(arg simulation)"/ >

  < include file="$(find turtlebot_bringup)/launch/includes/robot.launch.xml >
    < arg name="base" value="$(arg base)" / >
    < arg name="stacks" value="$(arg stacks)" / >
    < arg name="3d_sensor" value="$(arg 3d_sensor)" / >
    < arg name="sensor" value="$(arg sensor)" / >
  < /include >

In turtlebot_bringup/launch/includes/robot.launch.xml, I added two sentences to robot.launch.xml

< launch >
  < arg name="sensor"/ >

< include file="$(find turtlebot_bringup)/launch/includes/description_kobuki.launch.xml" >

  < arg name="sensor" value="$(arg sensor)" / > 
< /include >

In kobuki_description.launch,

< launch >
  < arg name="base"/>
  < arg name="stacks"/>
  < arg name="3d_sensor"/>
  < arg name="sensor"/>

  < arg name="urdf_file" default="$(find xacro)/xacro.py '$(find turtlebot_description)/robots/$(arg base)_$(arg stacks)_$(arg 3d_sensor)_$(arg sensor).urdf.xacro'" />
  < param name="robot_description" command="$(arg urdf_file)" / >
< /launch>

In kobuki_hexagons_kinect_hokuyo.urdf.xacro,

< robot name="turtlebot" xmlns:xacro="http://ros.org/wiki/xacro">

  < xacro:include filename="$(find turtlebot_description)/urdf/turtlebot2_library.urdf.xacro" />

  < kobuki/>
  < stack_hexagons parent="base_link"/>
  < sensor_kinect  parent="plate_top_link"/>
  < sensor_hokuyo parent="plate_middle_link">
</robot >

After that, I just write *.urdf.xacro.

edit flag offensive delete link more

Comments

It seems that my files are different than yours, but I believe that your answer is helpful. Thanks!

Yantian_Zha gravatar image Yantian_Zha  ( 2014-04-22 04:45:18 -0500 )edit

I'm sorry, I don't have a solution to move an arm. I think that point is difficult. If you solve the problem, I want you to report it. Thanks!

Ken_in_JAPAN gravatar image Ken_in_JAPAN  ( 2014-04-22 05:05:08 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2014-04-21 15:46:59 -0500

Seen: 1,535 times

Last updated: Apr 21 '14