How to simulate it?

Hi everyone, does anybody know how to simulate the solo8 robot? ROS or pybullet?

1 Like

Hi,

we have an example on how to simulate the solo8 robot using pybullet here;

Hi @jviereck, I tried running the example from the above path, i get following error:

robot_properties_solo/python/robot_properties_solo$ python3 solo8wrapper.py
pybullet build time: Jul 8 2020 18:23:32
Traceback (most recent call last):
File “solo8wrapper.py”, line 11, in
import config
File “/home/neo/workspace/dev/robo/open/robot_properties_solo/python/robot_properties_solo/config.py”, line 58, in
class SoloConfig(SoloAbstract):
File “/home/neo/workspace/dev/robo/open/robot_properties_solo/python/robot_properties_solo/config.py”, line 64, in SoloConfig
join(rospkg.RosPack().get_path(“robot_properties_” + robot_family),
File “/home/neo/anaconda3/envs/trifinger_simulation/lib/python3.6/site-packages/rospkg/rospack.py”, line 207, in get_path
raise ResourceNotFound(name, ros_paths=self._ros_paths)
rospkg.common.ResourceNotFound: robot_properties_solo

Is there a step which I missed to setup the environment?

Thanks!

Hi @aliasneo015, you need to have a ros workspace and compile things with catkin. Then you should be able to run the script.

Let me know if that works for you.

@jviereck can you give more details? What do I need to build?

Hi @jviereck,
Can you please share what I need to build in order to run the demos under robot_properties_solo/demos?

Thanks

UPDATE: Ros1 -> Ros2

(Dec 2, 2020) We switched from ros1 to ros2. The previous installation guide is therefore outdated. Please follow the new instructions here.


Hi @aliasneo015,

Here is a more step by step instructions.

# 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 kinetic.
source /opt/ros/kinetic/setup.bash

# Build your workspace.
cd workspace/
catkin build

# Source the build.
source devel/setup.bash

# Run the simulation.
cd src/robot_properties_solo/python/robot_properties_solo/
python quadruped12wrapper.py

Before running the things under demos, you will need to start gepetto viewer.

Let me know if that works for you.

Best,
Julian

Hi Julian, (@jviereck)

Thank you for your response. I followed the above steps and was able to build the packages with catkin. I am using Ubuntu 18.04 and running ‘melodic’ ROS.

Yet it is failing with similar error:

Traceback (most recent call last):
  File "quadruped12wrapper.py", line 11, in <module>
    from robot_properties_solo.config import Solo12Config
  File "/home/neo/workspace/dev/robo/open/workspace/src/robot_properties_solo/python/robot_properties_solo/config.py", line 58, in <module>
    class SoloConfig(SoloAbstract):
  File "/home/neo/workspace/dev/robo/open/workspace/src/robot_properties_solo/python/robot_properties_solo/config.py", line 64, in SoloConfig
    join(rospkg.RosPack().get_path("robot_properties_" + robot_family),
  File "/home/neo/anaconda3/envs/py2/lib/python2.7/site-packages/rospkg/rospack.py", line 207, in get_path
    raise ResourceNotFound(name, ros_paths=self._ros_paths)
rospkg.common.ResourceNotFound: robot_properties_solo
ROS path [0]=/opt/ros/melodic/share/ros
ROS path [1]=/opt/ros/melodic/share

Look at your ROS path it does not contain your workspace.
Hence I think that you did not source /home/neo/workspace/dev/robo/open/workspace/devel/setup.bash before trying to run the simulation.

Thank you @mnaveau , @jviereck
I was able to run the simulation :slight_smile: