CoppeliaSim for Panda - gkgkgk1215/else GitHub Wiki
- Updated at 2023. 10. 13
- User Manual: https://www.coppeliarobotics.com/helpFiles/index.html
Install CoppeliaSim
-
Download the latest ver. https://www.coppeliarobotics.com/downloads
-
Download previous of the sim https://www.coppeliarobotics.com/previousVersions
-
Download CoppeliaSim "Edu" and extract
mv ~/Downloads/CoppeliaSim_Edu_V4_5_1_rev4_Ubuntu20_04 ~
echo "export COPPELIASIM_ROOT_DIR=/home/minho/CoppeliaSim_Edu_V4_5_1_rev4_Ubuntu20_04" >> ~/.bashrc
source ~/.bashrc
Install ROS for CoppeliaSim
-
Read the ROS tutorial in CoppeliaSim https://www.coppeliarobotics.com/helpFiles/en/ros1Tutorial.htm
-
Install dependencies
sudo apt-get install python3-pip
sudo apt install xsltproc
conda activate minho
pip3 install xmlschema
- Repo
simExtROS: https://github.com/CoppeliaRobotics/simROS
rosbubble_rob: https://github.com/CoppeliaRobotics/ros_bubble_rob
- Clone repo & compile (option 1)
cd ~/catkin_ws/src
git clone https://github.com/CoppeliaRobotics/ros_bubble_rob.git
git clone https://github.com/CoppeliaRobotics/simROS.git sim_ros_interface
cd sim_ros_interface
git checkout coppeliasim-v4.5.0-rev4
cd ~/catkin_ws && catkin_make
- Copy from the CoppeliaSim folder & compile (option 2) --
cp ~/CoppeliaSim_Edu_V4_5_1_rev4_Ubuntu20_04/programming/ros_packages/* ~/catkin_ws/src/ -rf
cd ~/catkin_ws && catkin_make
- Copy library file to CoppeliaSim folder
cp ~/catkin_ws/devel/lib/libsimExtROS.so ~/CoppeliaSim_Edu_V4_5_1_rev4_Ubuntu20_04/
- Execute
roscore
~/CoppeliaSim_Edu_V4_5_1_rev4_Ubuntu20_04/coppeliaSim.sh
rosnode list
Remote API
conda activate minho
pip install pyzmq
pip install cbor
pip install coppeliasim-zmqremoteapi-client
- Test with the following Python script:
from coppeliasim_zmqremoteapi_client import RemoteAPIClient
client = RemoteAPIClient('localhost',23000)
sim = client.getObject('sim')
# call API function:
h = sim.getObject('/Floor')
print(h)