Baxter Simulation and Real Robot - mfkenson/MAEG5755-2021-Team-PARK GitHub Wiki
Real robot in the lab
First we have to edit the well known baxter.sh. Update your hostname of Baxter and your IP address.
timeout issue
There was a timeout problem previously and deleting the wait_for code block in baxter_interface package is obviously not an appropriate workaround. (Still take 30-90 sec to establish a connection)
Here is a better way:
sudo nano /etc/hosts
Add one entry
192.168.11.103 011508P0007.local
Ctrl + o to save Ctrl + x to exit
No need reboot or restart anything. Effective immediately.
Where 011508P0007.local is the hostname of the Baxter and 192.168.11.103 is the IP address of Baxter.
(ping 011508P0007 gives the IP address)
Gazebo Simulation
Note that orignal world path:
learning_ros_external_pkgs_noetic/baxter_simulator/baxter_gazebo/worlds/baxter.world
learning_ros_external_pkgs_noetic/baxter_simulator/baxter_gazebo/launch/baxter_world.launch
PARK Gazebo
Terminal 1
sw && roslaunch gazebo_ros empty_world.launch
Terminal 2
sw && roslaunch park_gazebo baxter_on_pedestal_w_realsense.launch
Terminal 3
baxter_home && sw && rviz -d src/team-park/park_simulation/park_gazebo/park.rviz
get ready...?
rosrun baxter_tools enable_robot.py -e
rosrun baxter_tools tuck_arms.py -u
prepare the table and toy blocks
roslaunch exmpl_models add_table_and_block.launch
roslaunch exmpl_models add_table.launch #optional
roslaunch park_gazebo add_toy_blocks.launch #optional
moveit
roslaunch baxter_moveit_tutorial moveit_init.launch
Camera topic
/d435/color/image_raw
/d435/depth/image_raw
saving an image from the depth topic
mkdir -p ~/Desktop/depth_images
cd ~/Desktop/depth_images
rosrun image_view image_saver image:=/d435/depth/image_raw _encoding:=16UC1 _filename_format:="image%04i.png"