The Visionary Researcher

전체 내용 "http://arnaudbertrand.io/blog/2015/06/26/ros-gazebo-tutorial-the-definitive-crash-course/"


1. ROS 설치

ubuntu 14.04 LTS 기준 ROS Jade 설치

ubuntu install of ROS Jade "http://wiki.ros.org/jade/Installation/Ubuntu"


~$ sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'~$ wget https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -O - | sudo apt-key add -
~$ sudo apt-get update
~$ sudo apt-get install ros-indigo-desktop-full
~$ sudo rosdep init
~$ rosdep update
~$ echo "source /opt/ros/indigo/setup.bash" >> ~/.bashrc
~$ sudo apt-get install python-rosinstall

test : ~$ roscore

2. GAZEBO 설정

GAZEBO 5.x 기본 설정(ROS 설치 시)

Install gazebo_ros_pkgs "http://gazebosim.org/tutorials?tut=ros_installing"

Install ros_control "http://wiki.ros.org/ros_control"

~$ sudo apt-get install ros-jade-gazebo-ros-pkgs
~$ sudo apt-get install ros-jade-ros-control
~$ sudo apt-get install ros-jade-ros-controllers

test : ~$ rosrun gazebo_ros gazebo 혹은 ~$ gazebo
~$ rostopic list
~$ rosservice list

특이사항 : GAZEBO 최신 버전인 7.0을 받으면 ROS와 호환이 잘 안됩니다.

3. Catkin workspace 구성
Create a ROS Workspace "http://wiki.ros.org/ROS/Tutorials/InstallingandConfiguringROSEnvironment"

~$ mkdir -p ~/catkin_ws/src
~$ cd ~/catkin_ws/src
~/catkin_ws/src$ catkin_init_workspace
~/catkin_ws/src$ cd ..
~/catkin_ws$ catkin_make
~/catkin_ws$ source devel/setup.bash

4. rrbot simulation

4.1 install
rrbot : gazebo_ros_demos "https://github.com/ros-simulation/gazebo_ros_demos"

~$ mkdir github
~$ cd github
~/github$ git clone git://github.com/ros-simulation/gazebo_ros_demos.git
~$ cd ~/catkin_ws
~/catkin_ws$ ln -s
~/github/gazebo_ros_demos ~/catkin_ws/src/gazebo_ros_demos
~
/catkin_ws$ catkin_make
~/catkin_ws$ source devel/setup.bash
~/catkin_ws$ cd
~$ sudo apt-get install ros-jade-effort-controllers ~$ sudo apt-get install ros-jade-joint-state-controller

4.2 ~/catkin_ws/src/gazebo_ros_demos/의 구성

/custom_plugin_tutorial
/launch
/hello.launch
/src
/simple_world_plugin.cpp
/worlds
/hello.world
/CMakeLists.txt
/package.xml
/rrbot_control
/config
/rrbot_control.yaml
/launch
/rrbot_control.launch
/rrbot_rqt.launch
/rrbot_rqt.perspective
/CMakeLists.txt
/package.xml
/rrbot_desciption
/launch
/rrbot.rviz
/rrbot_rviz.launch
/meshes
/hokuyo.dae
/urdf
/materials.xacro
/rrbot.gazebo
/rrbot.xacro
/rrbot.xml
/CMakeLists.txt
/package.xml
/rrbot_gazebo

/launch
/rrbot_world.launch
/worlds

/rrbot.world

/CMakeLists.txt
/package.xml
README.md


4.3 start the simulation

rrbot simulation "http://gazebosim.org/tutorials?tut=ros_control"


~$ roslaunch rrbot_gazebo rrbot_world.launch

~/catkin_ws$ source devel/setup.bash

~$ roslaunch rrbot_control rrbot_control.launch

test :

~$ rostopic list
~$ rosservice list

어떻게 rostopic을 사용할 것인가

rostopic pub -1 /rrbot/joint1_position_controller/command std_msgs/Float64 "data: 1.5" rostopic pub -1 /rrbot/joint2_position_controller/command std_msgs/Float64 "data: 1.0"


controller config


mobile_base_controller: type: "diff_drive_controller/DiffDriveController" left_wheel: 'wheel_left_joint' right_wheel: 'wheel_right_joint' pose_covariance_diagonal: [0.001, 0.001, 1000000.0, 1000000.0, 1000000.0, 1000.0] twist_covariance_diagonal: [0.001, 0.001, 1000000.0, 1000000.0, 1000000.0, 1000.0]

다른기기

"https://github.com/kulbu/kulbu"

roslaunch kulbu_base sim.launch
roslaunch kulbu_base real.launch
rosrun turtlebot_teleop turtlebot_teleop_key /turtlebot_teleop/cmd_vel:=/kulbu/diff_drive_controller/cmd_vel

5. 나만의 로봇 만들기

http://www.generationrobots.com/en/content/75-gazebo-and-ros


5.1 패키지 구성

control package

1. description package 구성

1.1 로봇을 모델링하여 urdf 파일을 구성합니다.

urdf 제작 "http://wiki.ros.org/urdf/Tutorials/Create%20your%20own%20urdf%20file"

sudo apt-get install liburdfdom-tools 오류 "http://installion.co.uk/ubuntu/trusty/universe/l/liburdfdom-tools/install/index.html"

urdf format 예시 "https://github.com/ros/urdf_tutorial/blob/master/urdf/06-flexible.urdf"

urdf joint format "http://wiki.ros.org/urdf/XML/joint"

urdf joint format2 "http://wiki.ros.org/urdf/Tutorials/Building%20a%20Movable%20Robot%20Model%20with%20URDF"


check_urdf myrobot.urdf를 자주 이용하여 문법이 맞는지 확인합니다.

urdf_to_graphiz my_robot.urdf를 이용하여 그래프를 그려봅니다.


2.gazebo package 구성

http://gazebosim.org/tutorials?tut=ros_roslaunch




http://gazebosim.org/tutorials/?tut=ros_urdf

http://gazebosim.org/tutorials?tut=ros_control

http://gazebosim.org/tutorials?tut=ros_roslaunch




roslaunch myrobot_gazebo myrobot_world.launch






gazebo package

세 개로 구성된다.

5.2 시작하며


1. Installing GAZEBO ROS package

http://gazebosim.org/tutorials?tut=ros_installing&cat=connect_ros






문제점 발결


roslaunch myrobot_gazebo myrobot_world.launch

roslaunch myrobot_control myrobot_control.launch

rostopic echo /mybot/joint_states


myrobot control의 에러 -> controller spawner couldn't find the expected controller_manager ROS interface

그리고 gzserver 안나옴 -> 그냥 파일 gazebo load했을때 안되는 문제랑 연결되는듯


transmission 문제 "http://wiki.ros.org/urdf/XML/Transmission"



cmd_vel 되게끔 "http://www.romin.upm.es/wiki/index.php?title=ROS%3ATutorials/Control_Your_Robot"rosto

'Study > Robotics' 카테고리의 다른 글

ROS GAZEBO tutorial  (0) 2016.03.17

Comment 0