Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help with running examples #41

Closed
xgamingman opened this issue Jan 1, 2024 · 1 comment
Closed

Help with running examples #41

xgamingman opened this issue Jan 1, 2024 · 1 comment

Comments

@xgamingman
Copy link

So, my current master thesis requires that I learn all about hydrodynamics in robotic manipulators, design a controller then perform simulation. I came across this incredible work, but I don't understand how to run the provided examples.

I installed stonefish on a Linux system and compiled the examples using (cmake and make commands). but after that i don't know how to run them. I just need a little push, then I will learn everything else on my own.

I tried webots and coppleasim as well as UUV with gazebo but stonefish seems like next level, so I want to work on my manipulator on it.

@xgamingman
Copy link
Author

xgamingman commented Jan 5, 2024

Below I am including how I managed to run the simulator using ros2 and the cpp provided examples to help someone struggling in the future.

/// ubuntu 22.04.01 - VMWARE 17 \\

0.1: install ros2 humble (or another version)
0.2: install stonefish (cmake, make, make install)
0.2a: if you want to run cpp stonefish then check issue #35 and add the 3 lines (comment from owner)
0.3: make ros2_ws (mkdir) and src (mkdir) ros2_ws
0.4: clone stonefishros2 inside src
0.4a: python3 -m pip install numpy
0.4b: pip install empy==3.3.2
0.4c: pip install lark
0.4d: check for other errors and use internet to look for missing dependencies
0.5: go to directory ros2_ws and run $ colcon build
0.6: (guide used for understnading ws) https://docs.ros.org/en/humble/Tutorials/Beginner-Client-Libraries/Creating-A-Workspace/Creating-A-Workspace.html
0.7: for starting just use the following (after sourcing) ros2 launch xml file:

<launch>
  <!-- args that can be set from the command line or a default will be used -->
  <arg name="background_r" default="0"/>

  <include file="$(find-pkg-share stonefish_ros2)/launch/stonefish_simulator.launch.py">
    <arg name="simulation_data" value="/home/machware/ros2_ws/src/Manip/"/>
    <arg name="scenario_desc" value="/home/machware/ros2_ws/src/Manip/Scenarios/MainWorld.scn.scn"/>
    <arg name="simulation_rate" value="30.0"/>
    <arg name="window_res_x" value="1000"/>
    <arg name="window_res_y" value="800"/>
    <arg name="rendering_quality" value="high"/>
  </include>
</launch>

// sourcing \

source /opt/ros/humble/setup.bash
cd ~/ros2_ws
source install/local_setup.bash
ros2 launch ~/ros2_ws/src/Manip/ManipOperate.launch.xml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant