본문 바로가기

Enginius/Robotics

Baxter in Gazebo

Install Gazebo Simulator with Baxter:


sudo apt-get -y install python-rosdep python-catkin-tools python-wstool

- Install python related stuffs


mkdir -p ~/ws_baxter/src

- Make new folder dedicated for baxter


cd ws_baxter/src


wstool init .

- We will use wstool


wstool merge https://raw.githubusercontent.com/vicariousinc/baxter_simulator/kinetic-gazebo7/baxter_simulator.rosinstall

- Download files


wstool update


rosdep install -y --from-paths . --ignore-src --rosdistro kinetic --as-root=apt:false


cd ..


catkin config --extend /opt/ros/kinetic --cmake-args -DCMAKE_BUILD_TYPE=Release


catkin build

(It is catkin build not catkin_make)


Add following to .bashrc


source ~/ws_baxter/devel/setup.bash

export ROS_MASTER_URI=http://localhost:11311


source ~/.bashrc


Caution. If you put


source ~/ws_baxter/devel/setup.bash

over existing source ~/catkin_ws/devel/setup.bash


Existing workspace for ROS will not work since it will override catkin_ws' setup.bash.

To use the ROS packages in catkin_ws/src, 


source ~/catkin_ws/devel/setup.bah


manually on the terminal.  

I have no idea how to use both at the same time.. 


Run Gazebo with Baxter


roslaunch baxter_gazebo baxter_world.launch


Run simple keyboard controller


rosrun baxter_examples joint_position_keyboard.py


Then, you will followings:



Make a custom script and run


make test.py under ~/ws_baxter/src/baxter_examples/scripts

 


chmod u+x test.py

- Change the file to be executable


rosrun baxter_examples test.py

- Run the file. Make sure that it is under baxter_examples so that rosrun can find where the file is.


















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

ROS tutorial (ROS package / node / topic / message / service / parameter/ launch)  (0) 2018.08.08
MuJoCo Walker2d  (0) 2018.07.27
OpenManipulator  (1) 2018.07.27
PythonRobotics  (0) 2018.07.09
Install Ubuntu (+apps) on MSI laptop  (0) 2018.07.03