Trying to run simulation - Need help

Hello, trying to run the demo simulations with the suggested steps in a previous Topic but I am getting a bunch of error on the build. Would someone be able to assist ?

Running Ubuntu 18.04.4 LTS with Melodic Ros.

Thanks

Hi DAM_Guru,

sorry for you running into this. We switched our software from ros1 to ros2 and are using the dashing release by now. This also goes with a few small changes where the demo files etc are located.

Here is a walk-through for the new version of ros tested with the current version of the code

# Go into your workspace folder (name it as you like).
cd dev/ws_robot_properties_solo_test/

# Clone the repository and project registration for treep.
git clone https://github.com/machines-in-motion/treep_machines_in_motion.git

# Clone required repositories.
treep --clone robot_properties_solo
treep --clone mpi_cmake_modules
treep --clone pinocchio_bullet 

# Make sure you have installed and setup the environment
# paths for pinocchio as described here:
#
#   https://stack-of-tasks.github.io/pinocchio/download.html

# Source your ros installation. Here, we are using ros2/dashing.
source /opt/ros/dashing/setup.bash

# Build your workspace.
cd workspace/
catkin build

# Source the build.
source install/local_setup.bash

# Run the demo simulation.
src/robot_properties_solo/demos
python demo_simulate_solo12.py

Best,
Julian

Thanks. this seems similar to what I found in another thread. I ran these steps under a slightly different setup and got these errors

not having any luck…any thoughts ?

It looks like you are missing xacro. You can install this package via

pip install xacro

Hi Julian thanks for the reply…well I got it installed…made progress but got a smaller set of errors.
What do you thunk ? appreciate your assistance :wink:

Hi Jumian…so I figured I needed spinxapidoc…installed it and it compiled;) but I cant get it to run…go this error now…getting close

K I have an update…upper window is my build error and lower window is my run error

Did you source your build?

I belive I did…top window…build complete and sourced…lower window tried running …python demo_simulate_solo12.py see attached

I feel like im close :wink: thanks for your help

The source command is per terminal. That means you need to run it in all the terminals you are using.

Did you run the source command also for the lower terminal?

I tried that but its weird…Im getting a new error of sorts…says no module named pybullet…I went through the config…anyway I can confirm its running right ? see attached…

do I have to be in a specific directory when adding the Source ?

Looks like you are missing pybullet. Try to install it via pip install pybullet.

I noticed in ubuntu…pip is generlly not used…its that ok ? i didnt use pip for sure

Pip is generally used to install python packages. Also on Ubuntu. To install pip use sudo apt install python-pip

K its weird…I am re pip a bunch of dependencies now… last one Ii am stuck on and cant seen to find iis utils

so frustrating…I am working from one terminal now…it appears i can find utils on the path that I configed with pinocchio setup suggested…I retyped the paths to be sure and followed them

export PATH=/opt/openrobots/bin:$PATH
export PKG_CONFIG_PATH=/opt/openrobots/lib/pkgconfig:$PKG_CONFIG_PATH
export LD_LIBRARY_PATH=/opt/openrobots/lib:$LD_LIBRARY_PATH
export PYTHONPATH=/opt/openrobots/lib/python2.7/site-packages:$PYTHONPATH # Adapt your desired python version here
export CMAKE_PREFIX_PATH=/opt/openrobots:$CMAKE_PREFIX_PATH

still getting the same error…

Kk I think I finally got it working to an extent…it compiles and it booted up…only issue is once the robot builds all up in the screen and moves once up and down then the window vanishes / crashes…and I am left with this window… not sure if this is now a VM issue with 3d video etc

That’s the desired output. You made it :slight_smile: The demo is closing the window once the simulation loop finished.

oh ok…awesome…so is the intent for these files just that short demo ? what does the display ones do ? Is there opportunity to do more with them ? :wink: thanks for your help with all this :wink:

So I am curious whats the other solo12 files for demo_simulate_solo12.py & demo_solo12_collision_detection.py ? Ii tried running those but got some different errors…