0% found this document useful (0 votes)
10 views

Lab6

This report provides an introduction to CoppeliaSim, a robot simulation software, focusing on its user interface, scene hierarchy, and object manipulation tools. Participants engaged in hands-on activities to build a simple crane model and write control scripts, emphasizing the importance of automation in robotics simulation. The lab aimed to equip students with foundational skills in robotics simulation, enabling them to design and control robotic mechanisms in a virtual environment.

Uploaded by

MiscTech
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

Lab6

This report provides an introduction to CoppeliaSim, a robot simulation software, focusing on its user interface, scene hierarchy, and object manipulation tools. Participants engaged in hands-on activities to build a simple crane model and write control scripts, emphasizing the importance of automation in robotics simulation. The lab aimed to equip students with foundational skills in robotics simulation, enabling them to design and control robotic mechanisms in a virtual environment.

Uploaded by

MiscTech
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Abstract

This report introduces the fundamentals of CoppeliaSim, focusing on essential tools and
techniques for designing and simulating robots. The primary objective of the lab session was to
familiarize the participants with CoppeliaSim, including its user interface, scene hierarchy, and
object manipulation. A structured, step-by-step approach was followed to construct a simple crane
model, incorporating various CoppeliaSim features such as primitive shapes, joints, and force
sensors. A script to control the crane's movement is also written and executed, gaining hands-on
experience in simulation programming. The lab aimed to provide foundational skills in robotics
simulation, enabling participants to understand the process of assembling and controlling robotic
mechanisms in a virtual environment before actually implementing the design on hardware.

1
Lab 1: Introduction to CoppeliaSim

Introduction:
CoppeliaSim, formerly known as V-REP, is a robot simulator used in industry, education and
research.[1][2] It was originally developed within Toshiba R&D and is currently being actively
developed and maintained by Coppelia Robotics AGy. It is built around a distributed control
architecture having Python and Lua scripts, or C/C++ plug-ins acting as individual, synchronous
controllers. Additional asynchronous controllers can execute in another process, thread or machine
via various middleware solutions (ROS, remote API,[3] ZeroMQ) with programming languages
such as C/C++, Python, Java and Matlab.

One of the key strengths of CoppeliaSim is its user-friendly graphical interface, which allows users
to easily create and manipulate objects, define kinematic chains, and configure sensors and
actuators. The software supports various types of joints, sensors, and controllers, enabling the
simulation of diverse robotic systems with high accuracy. Additionally, CoppeliaSim offers a
robust scripting environment, allowing users to implement custom control logic using Lua
scripting or external programming languages via its API.

CoppeliaSim uses a kinematics engine for forward and inverse kinematics calculations, and several
physics simulation libraries (MuJoCo, Bullet, ODE, Vortex, Newton Game Dynamics) to perform
rigid body simulation. Models and scenes are built by assembling various objects (meshes, joints,
various sensors, Point clouds, octrees, etc.) into a hierarchical structure. Additional functionality,
provided by plug-ins, include: motion planning (via OMPL), synthetic vision and imaging

2
processing (e.g. via OpenCV), collision detection, minimum distance calculation, customgraphical
user interfaces and Data visualization.

Objectives:
• Familiarize students with the CoppeliaSim environment, including its graphical user
interface (GUI), key features, and simulation controls.Develop proficiency in making 2D
sketches.

• Learn how to create, modify, and organize objects within a simulation scene using the
scene hierarchy.

• Gain hands-on experience in adding, configuring, and positioning objects within the
CoppeliaSim environment.

• Develop a simple script to control the crane’s movement, introducing the fundamentals of
CoppeliaSim scripting and automation.

Tasks:

Figure 1: Crane Model

3
Procedure:
Designing a Crane:

1. Add a cuboid of dimensions 1.2X1.2X0.3 at (-2, 0, 0.15).

Figure 2: Base

2. Add a cuboid of dimensions 0.4X0.4X7.7 at (-2. 0. 4.15).

Figure 3: Tower

4
3. Add a cuboid of dimensions 11X0.3X0.3 at (0, 0, 8.15).

Figure 4: Arm

4. Add a cuboid of dimensions 0.4X0.4.0X6 at (-4.45, 0, 7.7).

Figure 5: CounterWeight

5. Add a cuboid of dimensions 0.55X0.35X0.35 at (-1, 0, 7.825).

5
Figure 6: Crab

6. Add a cylinder of dimensions 0.1X0.1X0.1 at (-1, 0, 7.3).

Figure 7: UpperGuide

6
7. Add a cylinder of dimensions 0.1X0.1X0.1 at (1, 0, 1.8).

Figure 8: Gripper

8. Add a cylinder of dimensions 0.6X0.6X0.6 at (1, 0, 0.3).

Figure 9: Mass

7
9. Add the necessary joints and complete the model.

Figure 10: Crane

10. Write script in Lua simulate each joint.

Code:

1. function sysCall_init()
2. sim = require('sim')
3. simUI = require('simUI')
4. arm=sim.getObject(":/Arm_Actuator")
5. crab =sim.getObject(":/Crab_Actuator")
6. hoist=sim.getObject(":/Hoist_Actuator")
7. xml = [[
8.
9. <ui title="Speed Control" closeable="true" resizeable="false" activate="false">
10. <group layout="form" flat="true">
11. <label text="Arm Speed: 0.00" id="1"/>
12. <hslider tick-position="above" tick-interval="1" minimum="-10" maximum="10" on-
change="actuateArm" id="2"/>
13. <hslider tick-position="above" tick-interval="1" minimum="-10" maximum="10" on-
change="actuateCrab" id="3"/>
14. <hslider tick-position="above" tick-interval="1" minimum="-10" maximum="10" on-
change="actuateHoist" id="4"/>
15.
16.
17.
18. </group>
19. <label text="" style="* {margin-left: 400px;}"/>
20. </ui>
21. ]]
22. ui=simUI.create(xml)

8
23.
24. end
25.
26. function actuateArm(ui, id, newVal)
27. local Val=0.02*newVal
28. sim.setJointTargetVelocity(arm, newVal)
29. simUI.setLabelText(ui,1,string.format("Arm Speed: %.2f", Val))
30. end
31. function actuateCrab(ui, id, newVal)
32. local Val=0.02*newVal
33. sim.setJointTargetVelocity(crab, newVal)
34. simUI.setLabelText(ui,1,string.format("Crab Speed: %.2f", Val))
35. end
36. function actuateHoist(ui, id, newVal)
37. local Val=0.02*newVal
38. sim.setJointTargetVelocity(hoist, newVal)
39. simUI.setLabelText(ui,1,string.format("Hoist Speed: %.2f", Val))
40. end
41.

Discussion:
This report provides an introduction to CoppeliaSim, focusing on its graphical user interface
(GUI), scene hierarchy, and object manipulation tools essential for robotics simulation. By
following a structured approach, a variety of robotic systems can be modeled and simulated
using fundamental features such as primitive shapes, joints, sensors, and actuators. These
components form the foundation of robotics simulation, enabling users to design, test, and
control complex robotic mechanisms in a virtual environment. One of the key takeaways from
this report is the importance of understanding the scene hierarchy and object relationships in
CoppeliaSim. By organizing objects in a structured manner, users can efficiently build and
manage complex robotic systems. The use of joints, such as revolute and prismatic joints, allows
for the simulation of realistic mechanical movements, while sensors provide feedback on
interactions within the simulation. This hierarchical approach ensures that designs remain
organized and easily modifiable, making it possible to update a model without having to recreate
it from scratch. Additionally, features such as force sensors and scripting play a crucial role in
refining the simulation. Force sensors enable the measurement of interactions between objects,
providing valuable data for analyzing system behavior. Scripting, on the other hand, allows users
to implement custom control logic, automating the movement and operation of robotic systems.
Understanding how these features influence the overall functionality of a simulation is essential
for optimizing robotic design and control. The scripting component of the lab introduced
students to the basics of automation in CoppeliaSim. By writing a simple script to control the
crane's arm movement, students gained insight into how control algorithms can be implemented

9
in a simulated environment. This exercise highlighted the flexibility of CoppeliaSim's scripting
environment, which supports both Lua scripting and external programming languages via its
API. The ability to automate repetitive tasks and control robotic systems through scripting
significantly enhances productivity and allows users to focus on refining and optimizing their
designs.

Conclusion:
In conclusion, this lab introduced students to the fundamentals of CoppeliaSim, focusing on its
GUI, scene hierarchy, and object manipulation tools. Through hands-on activities, students
gained practical experience in building a simple crane model and writing control scripts,
highlighting the importance of automation and precision in robotics simulation.

References
1. Rohmer, Eric; Singh, Surya P. N.; Freese, Marc (3 November 2013). CoppeliaSim
(formerly V-REP): a Versatile and Scalable Robot Simulation Framework (PDF). 2013
IEEE/RSJ International Conference on Intelligent Robots and Systems. Tokyo, Japan.
pp. 1321–1326. doi:10.1109/IROS.2013.6696520.

2. "CoppeliaSim / V-REP paper references". Retrieved 9 September 2020.


3. "Remote API reference". Retrieved 26 April 2021.

10

You might also like