Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
hardware:rb1_simulation [2020/12/17 13:57]
cedric.lb [Testing]
hardware:rb1_simulation [2021/02/12 13:51] (current)
cedric.lb ↷ Page name changed from hardware:simulation to hardware:rb1_simulation
Line 6: Line 6:
 ===== Simulation ===== ===== Simulation =====
  
-This section ​will cover how to install, launch and test the rb1 simulation. It is based on ROS and uses rviz and gazebo. +This document ​will cover how to install, launch and test the rb1 simulation. It is based on ROS and uses rviz and gazebo.
- +
-{{:​hardware:​rb1_gazebo_start.png|}}+
  
 ==== Installation ==== ==== Installation ====
Line 14: Line 12:
 === ROS === === ROS ===
    
-If it hasn't been done already, the first step is to install ROS. The installation process and required ROS version ​varies ​depending on the OS. The simulation has been tested on ROS melodic and kinetic.+If it hasn't been done already, the first step is to install ROS. The installation process and required ROS version ​vary depending on the OS. The simulation has been tested on ROS melodic and kinetic.
  
 ROS Melodic (Ubuntu 18.04): [[http://​wiki.ros.org/​melodic/​Installation]] \\ ROS Melodic (Ubuntu 18.04): [[http://​wiki.ros.org/​melodic/​Installation]] \\
 ROS Kinetic (Ubuntu 16.04): [[http://​wiki.ros.org/​kinetic/​Installation]] ROS Kinetic (Ubuntu 16.04): [[http://​wiki.ros.org/​kinetic/​Installation]]
  
-If this your first time using ROS, it is recommended to follow the tutorials at: [[http://​wiki.ros.org/​ROS/​Tutorials]]+If this is your first time using ROS, it is recommended to follow the tutorials at: [[http://​wiki.ros.org/​ROS/​Tutorials]]
  
 The next step is to create a catkin workspace to put all the simulation packages. Details are provided here: [[http://​wiki.ros.org/​ROS/​Tutorials/​InstallingandConfiguringROSEnvironment]] The next step is to create a catkin workspace to put all the simulation packages. Details are provided here: [[http://​wiki.ros.org/​ROS/​Tutorials/​InstallingandConfiguringROSEnvironment]]
Line 27: Line 25:
 Once ROS has been installed and a catkin workspace has been prepared, the simulation packages can be installed. Once ROS has been installed and a catkin workspace has been prepared, the simulation packages can be installed.
  
-A script has been prepared for the complete installation of all the required ​packages ​on ROS kinetic and melodic. +The commands to install ​all the packages ​are as followed:
- +
-The content of the script is as followed:+
  
   cd /​path/​to/​catkin_workspace/​   cd /​path/​to/​catkin_workspace/​
Line 48: Line 44:
 Install dependencies. ${ROS_DISTRO} is an environment variable corresponding to the ROS distribution installed. Install dependencies. ${ROS_DISTRO} is an environment variable corresponding to the ROS distribution installed.
  
-  ​sudo apt-get install ros-${ROS_DISTRO}-ros-control ros-${ROS_DISTRO}-joint-state-controller ros-${ROS_DISTRO}-effort-controllers ros-${ROS_DISTRO}-position-controllers ros-${ROS_DISTRO}-velocity-controllers ros-${ROS_DISTRO}-ros-controllers ros-${ROS_DISTRO}-gazebo-ros ros-${ROS_DISTRO}-gazebo-ros-control +  sudo apt-get install ros-${ROS_DISTRO}-ros-control ros-${ROS_DISTRO}-joint-state-controller ros-${ROS_DISTRO}-effort-controllers ros-${ROS_DISTRO}-position-controllers ros-${ROS_DISTRO}-velocity-controllers ros-${ROS_DISTRO}-ros-controllers ros-${ROS_DISTRO}-gazebo-ros ros-${ROS_DISTRO}-gazebo-ros-control 
-  ​#rosdep update +  rosdep install --from-paths src --ignore-src -r -y
-  $ rosdep install --from-paths src --ignore-src -r -y+
   ​   ​
 Install or update additional dependencies and packages used for simulations (gazebo...) ​ Install or update additional dependencies and packages used for simulations (gazebo...) ​
  
 +  git clone TODO
 + 
 +Package containing .launchfile for the simulation and fixing a few bugs from the rb1 packages.
 +
 +A script has been prepared for the complete installation of all the required packages on ROS kinetic and melodic.
 ==== Launching ==== ==== Launching ====
  
Line 63: Line 63:
   source devel/​setup.bash   source devel/​setup.bash
   roslaunch rb1_fix rb1_${ROS_DISTRO}_complete.launch   roslaunch rb1_fix rb1_${ROS_DISTRO}_complete.launch
-  ​+ 
 +The differences between the kinetic and melodic launchfiles are very slim. The only difference is that a dependency has a different name on kinetic and melodic.  
 Optional arguments: Optional arguments:
 +
 +  TODO
 + 
 ==== Testing ==== ==== Testing ====
  
-Once simulation ​was launched, three windows should open.+Once simulation ​is launched, three windows should open.
  
 === RVIZ === === RVIZ ===
  
-The first window contains a 2D representation of the robot in its environment ​and feedback ​from the robot sensors.+The first window contains a 2D representation of the robot in its environment. It's also possible to use it to collect data from the robot'​s ​sensors.
  
-{{hardware:​rb1_rviz_working.png}}+{{hardware:​rb1_rviz_working.png?500}}
  
-By clicking on "2D Nav Goal", it is possible to set a destination ​to the robot. ​+By clicking on "2D Nav Goal", it is possible to select ​a destination ​for the robot. ​
  
-{{hardware::​rb1_rviz_navigation.png}}+{{hardware::​rb1_rviz_navigation.png?500}}
  
-Other information can be retrieved such as the images taken from the RGBD camera. To do so, click on the left side of rviz and select "Front RGBD camera"​+Other information can be retrieved such as the images taken by the RGBD camera. To do so, click on the left side of rviz and select "Front RGBD camera"​
  
-{{hardware::​rb1_rviz_rgbd.png}}+{{hardware::​rb1_rviz_rgbd.png?500}}
  
 === Gazebo === === Gazebo ===
Line 87: Line 92:
 Gazebo contains a 3D reprentation of the robot in its environment. If commands are sent to the robot, those changes will be reflected in the gazebo simulation. Gazebo contains a 3D reprentation of the robot in its environment. If commands are sent to the robot, those changes will be reflected in the gazebo simulation.
  
-{{hardware::​rb1_gazebo_start.png}}+{{hardware::​rb1_gazebo_start.png?500}}
  
 However, Rviz and gazebo may not be perfectly synchronized. Unlike Rviz, Gazebo simulates the physics of the robot. As such, navigation with Gazebo may be significantly slower depending on the position of the arm. However, Rviz and gazebo may not be perfectly synchronized. Unlike Rviz, Gazebo simulates the physics of the robot. As such, navigation with Gazebo may be significantly slower depending on the position of the arm.
Line 93: Line 98:
 Moreover, the robot may fall down during the simulation. In order to fix it, the solution is to go to Edit > Reset Model poses. Moreover, the robot may fall down during the simulation. In order to fix it, the solution is to go to Edit > Reset Model poses.
  
-{{hardware::​rb1_gazebo_falling.png}}+{{hardware::​rb1_gazebo_falling.png?500}}
  
 === Moveit === === Moveit ===
Line 99: Line 104:
 Moveit is a platform which enables motion planning and the manipulation of objects. Moveit is a platform which enables motion planning and the manipulation of objects.
  
-At launch, the robot will be loaded as well as a cursor. This cursors ​is used to select a destination for the arm.+At launch, the robot will be loaded as well as a cursor. This cursor ​is used to select a destination for the arm.
  
-{{hardware::​rb1_moveit_working.png}}+{{hardware::​rb1_moveit_working.png?500}}
  
-Once a destination has been set, the movement can be planned and executed using the menu on the bottom ​right. To do so, select "Start State" and "Goal State" as //​current//,​ press "​Plan",​ followed by "​Execute"​.+Once a destination has been set, the movement can be planned and executed using the menu on the bottom-left. To do so, select "Start State" and "Goal State" as //​current//,​ press "​Plan",​ followed by "​Execute"​.
  
-{{hardware::​rb1_moveit_menu.png}}+{{hardware::​rb1_moveit_menu.png?500}}
  
-If the arm and/or the robot appear in red, it means the arm is in collision with the base. When this happens, moving the arm becomes impossible. To solve this issue, a possible approach is to go to gazebo and Edit > Reset Model poses to reset the position of the arm. A similar issue may appear if a joint is in an impossible position (I.e: joint'​s angle above its limit)+If the arm and/or the robot appear in red, it means the arm is in collision with the base. When this happens, moving the arm becomes impossible. To solve this issue, a possible approach is to go to gazebo and Edit > Reset Model poses to reset the position of the arm. A similar issue may appear if a joint is in an impossible position (I.e: above its angle/​position ​limit)
  
 If the arm is in a difficult position, a possible workaround is to select "Start state" as current, "Goal state" as random valid and allows Cartesian path. If the arm is in a difficult position, a possible workaround is to select "Start state" as current, "Goal state" as random valid and allows Cartesian path.
 ==== Known issues ==== ==== Known issues ====
  
 +=== The robot doesn'​t appear in Rviz ===
 +
 +This appears if the "​prefix"​ argument of rb1_fix/​rb1_xx_complete.launch is changed or when using the launchfile from rb1_sim.
 +
 +In that case, it is required to adjust the topics used by rviz. Either by changing the prefix or adding it using the prefix_name/​ pattern.
 +
 +For instance, if the prefix is "​rb1":​
 +
 +{{hardware:​rb1_rviz_errors.png?​500}}
 +{{hardware:​rb1_errors_rviz_fixed.png?​500}}
 +
 +If done correctly, the warnings or errors for each section should disappear.
 +
 +=== Gazebo: arm is stuck in a vertical position ===
 +
 +{{hardware:​rb1_arm.png?​500}}
  
 +This is issue is caused by incompabilities issues between the rb1_sim / rb1_common packages with kinova-ros. To solve this problem, it is currently mandatory to install the kinetic-devel version of kinova-ros.
  
 +=== ===
  • hardware/rb1_simulation.1608213457.txt.gz
  • Last modified: 2020/12/17 13:57
  • by cedric.lb