Skip to content

Commit

Permalink
Break up bitbots wolfgang folder (#607)
Browse files Browse the repository at this point in the history
  • Loading branch information
Flova authored Oct 23, 2024
2 parents 90bde1d + bf526c4 commit b226971
Show file tree
Hide file tree
Showing 483 changed files with 171 additions and 142 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<arg name="world_model" default="true" description="Whether the world model should be started"/>

<!-- load the general simulator -->
<include file="$(find-pkg-share wolfgang_webots_sim)/launch/simulation.launch" />
<include file="$(find-pkg-share bitbots_webots_sim)/launch/simulation.launch" />

<!-- load teamplayer software stack -->
<include file="$(find-pkg-share bitbots_bringup)/launch/teamplayer.launch">
Expand Down
2 changes: 1 addition & 1 deletion bitbots_misc/bitbots_bringup/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

<depend>bitbots_docs</depend>

<exec_depend condition="$IS_ROBOT != True">wolfgang_webots_sim</exec_depend>
<exec_depend condition="$IS_ROBOT != True">bitbots_webots_sim</exec_depend>
<exec_depend>audio_common</exec_depend>
<exec_depend>bitbots_basler_camera</exec_depend>
<exec_depend>bitbots_body_behavior</exec_depend>
Expand Down
6 changes: 3 additions & 3 deletions bitbots_misc/bitbots_containers/hlvs/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ RUN cd src/bitbots_main && \
make pull-all && \
rm -rf lib/udp_bridge bitbots_misc/bitbots_containers \
lib/dynamic_stack_decider/dynamic_stack_decider_visualization bitbots_lowlevel \
bitbots_wolfgang/wolfgang_pybullet_sim lib/DynamixelSDK lib/dynamixel-workbench \
bitbots_robot/bitbots_pybullet_sim lib/DynamixelSDK lib/dynamixel-workbench \
bitbots_misc/bitbots_basler_camera && \
sed -i '/plotjuggler/d' bitbots_motion/bitbots_quintic_walk/package.xml && \
sed -i '/run_depend/d' bitbots_wolfgang/wolfgang_moveit_config/package.xml
sed -i '/run_depend/d' bitbots_robot/wolfgang_moveit_config/package.xml

# Install ros dependencies with rosdep
RUN sudo apt update && rosdep update
Expand All @@ -75,7 +75,7 @@ RUN . /opt/ros/iron/setup.sh && colcon build --cmake-args -DBUILD_TESTING=OFF

# TODO execute tests

RUN cp src/bitbots_main/bitbots_wolfgang/wolfgang_robocup_api/scripts/start.sh .local/bin/start
RUN cp src/bitbots_main/bitbots_robot/bitbots_robocup_api/scripts/start.sh .local/bin/start

# Volume for logs
VOLUME /robocup-logs
Expand Down
2 changes: 1 addition & 1 deletion bitbots_misc/bitbots_docs/docs/manual/testing/sim_test.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Test Motion

.. code-block:: bash
ros2 launch wolfgang_webots_sim simulation.launch
ros2 launch bitbots_webots_sim simulation.launch
ros2 launch bitbots_bringup motion_standalone.launch sim:=true
To control walking of the robot, teleop needs to be startet as well:
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.5)
project(wolfgang_pybullet_sim)
project(bitbots_pybullet_sim)

# Add support for C++17
if(NOT CMAKE_CXX_STANDARD)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
This package provides a PyBullet simulation environment with ROS topic support for the Wolfgang Robot.
This package provides a PyBullet simulation environment with ROS topic support.

There are different options to use this:
1. Start the simulation with interface `rosrun wolfgang_pybullet_sim simulation_with_gui.py`
2. Start the simulation without interface `rosrun wolfgang_pybullet_sim simulation_headless.py`
1. Start the simulation with interface `rosrun bitbots_pybullet_sim simulation_with_gui.py`
2. Start the simulation without interface `rosrun bitbots_pybullet_sim simulation_headless.py`
3. Use the python class `Simulation` in `simulation.py` to directly run a simulation without using ROS

Shortcuts in gui:
Expand All @@ -15,4 +15,4 @@ Shortcuts in gui:

`s` hold to step while pausing

`n` gravity on/off
`n` gravity on/off
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from transforms3d.euler import euler2quat, quat2euler
from transforms3d.quaternions import qinverse, quat2mat, rotate_vector

from wolfgang_pybullet_sim.terrain import Terrain
from bitbots_pybullet_sim.terrain import Terrain


class Simulation:
Expand Down Expand Up @@ -177,7 +177,7 @@ def load_models(self):
# Load field

rospack = rospkg.RosPack()
path = os.path.join(rospack.get_path("wolfgang_pybullet_sim"), "models")
path = os.path.join(rospack.get_path("bitbots_pybullet_sim"), "models")
p.setAdditionalSearchPath(path) # needed to find field model
self.field_index = p.loadURDF("field/field.urdf")

Expand Down
17 changes: 17 additions & 0 deletions bitbots_simulation/bitbots_pybullet_sim/launch/simulation.launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<launch>
<arg name="gui" default="true"/>

<group if="$(var gui)">
<node pkg="bitbots_pybullet_sim" exec="simulation_with_gui.py" name="pybullet_sim" output="screen">
<param from="$(find-pkg-share bitbots_pybullet_sim)/config/config.yaml"/>
</node>
</group>
<group unless="$(var gui)">
<node pkg="bitbots_pybullet_sim" exec="simulation_headless.py" name="pybullet_sim" output="screen">
<param from="$(find-pkg-share bitbots_pybullet_sim)/config/config.yaml"/>
</node>
</group>
<include file="$(find-pkg-share bitbots_webots_sim)/launch/imu_filter_sim.launch">
<arg name="sim" value="true"/>
</include>
</launch>
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>wolfgang_pybullet_sim</name>
<name>bitbots_pybullet_sim</name>
<version>1.3.0</version>
<description>Simulation environment using PyBullet for Wolfgang robot.</description>
<description>Simulation environment using PyBullet.</description>

<maintainer email="bestmann@informatik.uni-hamburg.de">Marc Bestmann </maintainer>
<maintainer email="info@bit-bots.de">Hamburg Bit-Bots</maintainer>
Expand All @@ -21,15 +21,15 @@
<depend>rosgraph_msgs</depend>
<depend>std_msgs</depend>
<depend>bitbots_docs</depend>
<depend>wolfgang_webots_sim</depend>
<depend>bitbots_webots_sim</depend>
<depend>tf_transformations</depend>
<depend>python3-transforms3d</depend>
<depend>python3-numpy</depend>

<export>
<bitbots_documentation>
<status>unknown</status>
<language>python</language>
</bitbots_documentation>
<bitbots_documentation>
<status>unknown</status>
<language>python</language>
</bitbots_documentation>
</export>
</package>
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
import threading

import rclpy
from bitbots_pybullet_sim.ros_interface import ROSInterface
from bitbots_pybullet_sim.simulation import Simulation
from rclpy.node import Node
from wolfgang_pybullet_sim.ros_interface import ROSInterface
from wolfgang_pybullet_sim.simulation import Simulation

if __name__ == "__main__":
rclpy.init(args=None)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
import threading

import rclpy
from bitbots_pybullet_sim.ros_interface import ROSInterface
from bitbots_pybullet_sim.simulation import Simulation
from rclpy.node import Node
from wolfgang_pybullet_sim.ros_interface import ROSInterface
from wolfgang_pybullet_sim.simulation import Simulation

if __name__ == "__main__":
rclpy.init(args=None)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from catkin_pkg.python_setup import generate_distutils_setup

d = generate_distutils_setup(
packages=["wolfgang_pybullet_sim"],
packages=["bitbots_pybullet_sim"],
# scripts=['bin/myscript'],
package_dir={"": "src"},
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
This package bridges between the [official Humanoid League RoboCup Proto3 API](https://cdn.robocup.org/hl/wp/2021/05/v-hsc_simulator_api_v1.0.pdf) and our ROS topics for the Wolfgang Robot.
This package bridges between the [official Humanoid League RoboCup Proto3 API](https://cdn.robocup.org/hl/wp/2021/05/v-hsc_simulator_api_v1.0.pdf) and our ROS topics.
62 changes: 62 additions & 0 deletions bitbots_simulation/bitbots_robocup_api/config/bitbots_walk.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"name": "Bit-Bots",
"players": {
"1": {
"proto": "Wolfgang",
"dockerTag": "latest",
"dockerCmd": "roslaunch bitbots_robocup_api robocup_walk.launch",
"halfTimeStartingPose": {
"translation": [
-3.6,
-3.20,
0.43
],
"rotation": [
0.13,
-0.13,
-0.98,
-1.57
]
},
"reentryStartingPose": {
"translation": [
-3.6,
-3.20,
0.43
],
"rotation": [
0.0,
-0.0,
-1.0,
-1.57
]
},
"shootoutStartingPose": {
"translation": [
2.6,
0,
0.43
],
"rotation": [
0,
0.98,
0.13,
0.26
]
},
"goalKeeperStartingPose": {
"translation": [
-4.47,
0,
0.43
],
"rotation": [
-0.13,
0,
0.98,
3.14
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<?xml version="1.0"?>
<launch>
<node pkg="hlvs_player" exec="hlvs_player" output="screen">
<param name="devices_file" value="$(find-pkg-share wolfgang_robocup_api)/config/devices.json"/>
<param name="devices_file" value="$(find-pkg-share bitbots_robocup_api)/config/devices.json"/>
<remap from="camera/image_raw" to="camera/image_proc"/>
<remap from="imu/data" to="imu/data_raw"/>
</node>
<!-- The hlvs_player expects the joint command positions as a 'JointState' message.
We therfore need to convert the messages from our custom 'JointCommand' message to the
more common 'JointState' layout. -->
<node pkg="wolfgang_robocup_api" exec="command_proxy" output="screen">
<node pkg="bitbots_robocup_api" exec="command_proxy" output="screen">
<remap from="input" to="DynamixelController/command"/>
<remap from="output" to="joint_command"/>
</node>
<include file="$(find-pkg-share wolfgang_webots_sim)/launch/imu_filter_sim.launch" />
<include file="$(find-pkg-share bitbots_webots_sim)/launch/imu_filter_sim.launch" />
</launch>
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</group>

<!-- load the robocup api -->
<include file="$(find-pkg-share wolfgang_robocup_api)/launch/wolfgang_robocup_api_bridge.launch" />
<include file="$(find-pkg-share bitbots_robocup_api)/launch/bitbots_robocup_api_bridge.launch" />

<!-- launch the team player -->
<include file="$(find-pkg-share bitbots_bringup)/launch/teamplayer.launch">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<launch>
<include file="$(find wolfgang_robocup_api)/launch/wolfgang_robocup_api_bridge.launch" />
<include file="$(find bitbots_robocup_api)/launch/bitbots_robocup_api_bridge.launch" />

<include file="$(find bitbots_bringup)/launch/motion_standalone.launch">
<arg name="sim" value="true" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>wolfgang_robocup_api</name>
<name>bitbots_robocup_api</name>
<version>0.0.0</version>
<description>Bridge between the official Humanoid League RoboCup Proto3 API
and our ROS topics for the Wolfgang Robot
Expand All @@ -23,7 +23,7 @@
<depend>hlvs_player</depend>
<depend>rclpy</depend>
<depend>sensor_msgs</depend>
<depend>wolfgang_webots_sim</depend>
<depend>bitbots_webots_sim</depend>
<depend>protobuf-dev</depend>
<depend>urdfdom_py</depend>
<depend>topic_tools</depend>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,4 +138,4 @@ sed -i "/^ target_ip:/s/^.*$/ target_ip: $ROBOCUP_MIRROR_SERVER_IP/" $TEAM
# Start ROS #
#############

exec ros2 launch wolfgang_robocup_api robocup_teamplayer.launch record:=$RECORD
exec ros2 launch bitbots_robocup_api robocup_teamplayer.launch record:=$RECORD
4 changes: 4 additions & 0 deletions bitbots_simulation/bitbots_robocup_api/setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[develop]
script_dir=$base/lib/bitbots_robocup_api
[install]
install_scripts=$base/lib/bitbots_robocup_api
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from setuptools import find_packages, setup

package_name = "wolfgang_robocup_api"
package_name = "bitbots_robocup_api"

setup(
name=package_name,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.5)
project(wolfgang_webots_sim)
project(bitbots_webots_sim)

# Add support for C++17
if(NOT CMAKE_CXX_STANDARD)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from wolfgang_webots_sim.webots_robot_controller import RobotController
from wolfgang_webots_sim.webots_supervisor_controller import SupervisorController
from bitbots_webots_sim.webots_robot_controller import RobotController
from bitbots_webots_sim.webots_supervisor_controller import SupervisorController


class RobotSupervisorController(SupervisorController, RobotController):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Run the script to adapt the urdf to be usable by webots2urdf

.. code-block:: bash
roscd wolfgang_webots_sim
roscd bitbots_webots_sim
python scripts/fix_urdf_for_webots.py ../wolfgang_description/urdf/robot.urdf webots_robot.urdf
Run the conversion script from urdf to proto file
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
<node pkg="tf2_ros" exec="static_transform_publisher" name="donna_map" args="0 0 0 0 0 0 1 map donna/map" />
<node pkg="tf2_ros" exec="static_transform_publisher" name="melody_map" args="0 0 0 0 0 0 1 map melody/map" />

<node pkg="wolfgang_webots_sim" exec="localization_faker.py" name="localization_faker"/>
</launch>
<node pkg="bitbots_webots_sim" exec="localization_faker.py" name="localization_faker"/>
</launch>
Loading

0 comments on commit b226971

Please sign in to comment.