Skip to content

Commit

Permalink
Merge branch 'master' into Phantom-FrameLog-Restart-Jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
Pherring04 committed Oct 29, 2024
2 parents 54dc69b + a352c82 commit d6e0c25
Show file tree
Hide file tree
Showing 47 changed files with 1,062 additions and 414 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
container: docker://nasatrick/${{matrix.container}}:latest
strategy:
matrix:
container: [trick_centos7, trick_centos8, trick_ubuntu1804]
container: [trick_ubuntu1804]
steps:
- name: run tests
run: |
Expand Down
86 changes: 0 additions & 86 deletions .github/workflows/python_tests_32.yml

This file was deleted.

24 changes: 0 additions & 24 deletions .github/workflows/python_tests_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ jobs:
- { os: ubuntu, tag: 18.04, arch: debian } # EOL April 2023
- { os: ubuntu, tag: 20.04, arch: debian } # EOL April 2025
- { os: debian, tag: 10, arch: debian } # EOL 2024
- { os: centos, tag: 7, arch: rhel } # EOL June 2024
- { os: centos, tag: latest, arch: rhel } # 8 as of April 2020
# - { os: fedora, tag: latest, arch: rhel } # 31 as of April 2020
# - { os: fedora, tag: 33, arch: rhel } # feeling confident?
# - { os: fedora, tag: rawhide, arch: rhel } # for thrill-seekers only
Expand Down Expand Up @@ -102,13 +100,6 @@ jobs:
- cfg: { os: debian }
os_deps: >-
openjdk-11-jdk
#-------- CentOS Only Dependencies ----------------
- cfg: { os: centos }
pkg_mgr: yum
conf_pkg: yum -y install epel-release && yum -y update
os_deps: >-
libX11-devel
libXt-devel
#-------- Fedora Only Dependencies ----------------
# - cfg: { os: fedora }
# pkg_mgr: dnf
Expand All @@ -123,21 +114,6 @@ jobs:
install_gtest: cd /usr/src/gtest && cmake . && make && cp lib/libgtest* /usr/lib/
tag_deps: >-
python3.8-dev
- cfg: { os: centos, tag: 7 }
tag_deps: >-
swig3
python-devel
- cfg: { os: centos, tag: latest }
pkg_mgr: dnf
conf_pkg: >
sed -i -e "s|mirrorlist=|#mirrorlist=|g" -e "s|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g" /etc/yum.repos.d/CentOS-Linux-* &&
dnf -y install epel-release &&
dnf -y update &&
dnf install -y 'dnf-command(config-manager)' &&
dnf config-manager --enable powertools
tag_deps: >-
swig
python3-devel diffutils
#-------- Job definition ----------------
runs-on: ubuntu-18.04
container: docker://${{matrix.cfg.os}}:${{matrix.cfg.tag}}
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/report_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ jobs:
cfg:
#-------- Operating Systems ----------------
- { os: ubuntu, tag: 22.04, arch: debian, arch_ver: 12 }
- { os: centos, tag: 7, arch: rhel, arch_ver: 7 }
- { os: rockylinux, tag: 8, arch: rhel, arch_ver: 8 }
- { os: oraclelinux, tag: 8, arch: rhel, arch_ver: 8 }
python: [3]
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/report_linux_py2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ jobs:
cfg:
#-------- Operating Systems ----------------
- { os: ubuntu, tag: 22.04, arch: debian, arch_ver: 12 }
- { os: centos, tag: 7, arch: rhel, arch_ver: 7 }
- { os: rockylinux, tag: 8, arch: rhel, arch_ver: 8 }
- { os: oraclelinux, tag: 8, arch: rhel, arch_ver: 8 }
python: [2]
Expand Down
69 changes: 0 additions & 69 deletions .github/workflows/test_32.yml

This file was deleted.

25 changes: 0 additions & 25 deletions .github/workflows/test_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ jobs:
cfg:
#-------- Operating Systems ----------------
- { os: ubuntu, tag: 22.04, arch: debian, arch_ver: 12 }
- { os: centos, tag: 7, arch: rhel, arch_ver: 7 }
- { os: rockylinux, tag: 8, arch: rhel, arch_ver: 8 }
- { os: oraclelinux, tag: 8, arch: rhel, arch_ver: 8 }
python: [3]
Expand Down Expand Up @@ -95,30 +94,6 @@ jobs:
zlib-devel
python2-devel
python3-devel
#-------- RHEL 7-based Only Dependencies ----------------
- cfg: { arch: rhel, arch_ver: 7 }
pkg_mgr: yum
conf_pkg: |
sed -i -e "s|mirrorlist=|#mirrorlist=|g" -e "s|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g" /etc/yum.repos.d/CentOS-* &&
yum -y install epel-release
yum -y update
yum -y install wget
os_deps: >-
libX11-devel
libXt-devel
swig3
install_gtest: |
cd /tmp
wget https://github.com/google/googletest/archive/release-1.8.0.tar.gz
tar xzvf release-1.8.0.tar.gz
cd /tmp/googletest-release-1.8.0/googletest
cmake .
make
make install
cd /tmp/googletest-release-1.8.0/googlemock
cmake .
make
make install
#-------- RHEL 8-based Only Dependencies ----------------
- cfg: { arch: rhel, arch_ver: 8 }
pkg_mgr: dnf
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/test_linux_py2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ jobs:
cfg:
#-------- Operating Systems ----------------
- { os: ubuntu, tag: 22.04, arch: debian, arch_ver: 12 }
- { os: centos, tag: 7, arch: rhel, arch_ver: 7 }
- { os: rockylinux, tag: 8, arch: rhel, arch_ver: 8 }
- { os: oraclelinux, tag: 8, arch: rhel, arch_ver: 8 }
python: [2]
Expand Down
23 changes: 4 additions & 19 deletions libexec/trick/convert_swig
Original file line number Diff line number Diff line change
Expand Up @@ -338,23 +338,6 @@ sub process_file() {
print OUT "$contents\n" ;
print OUT $global_template_typedefs ;

# Add _swig_setattr_nondynamic_instance_variable function for raising AttributeError for improper non-class attribute assingment in input processor.
# _swig_setattr_nondynamic_instance_variable function is added for each class in process_class subroutine.
foreach my $c ( @class_names ) {
if ( ! exists $class_typemap_printed{$c} ) {
my $c_ = $c ;
$c_ =~ s/\:/_/g ;
if ( $c !~ /::/ ) {
print OUT "\n#if SWIG_VERSION > 0x040000\n";
print OUT "%pythoncode %{\n" ;
print OUT " if '$c' in globals():\n";
print OUT " $c.__setattr__ = _swig_setattr_nondynamic_instance_variable(object.__setattr__)\n" ;
print OUT "%}\n" ;
print OUT "#endif\n";
}
}
}

# Add a trick_cast_as macro line for each class parsed in the file. These lines must appear at the bottom of the
# file to ensure they are not in a namespace directive and they are after the #define statements they depend on.
undef %class_typemap_printed ;
Expand Down Expand Up @@ -785,7 +768,7 @@ sub process_typedef_struct($$$$) {
my ($typedef_struct_string , $contents_ref, $new_contents_ref , $class_names_ref) = @_ ;

my $extracted ;
my ($tail , $struct_names, @struct_names) ;
my ($tail , $my_struct_contents, $struct_names, @struct_names) ;

#print "*** typedef_struct_string = $typedef_struct_string ***\n" ;

Expand All @@ -811,10 +794,12 @@ sub process_typedef_struct($$$$) {
foreach my $s ( @struct_names ) {
if ( $s !~ /\*/ ) {
push @$class_names_ref , $s ;
# Add _swig_setattr_nondynamic_instance_variable function for raising AttributeError for improper struct attribute assingment in input processor
$my_struct_contents .= "\n#if SWIG_VERSION > 0x040000\n\%pythoncode \%{\n if '$s' in globals():\n $s.__setattr__ = _swig_setattr_nondynamic_instance_variable(object.__setattr__)\n\%}\n#endif\n" ;
}
}

$$new_contents_ref .= $extracted . $tail ;
$$new_contents_ref .= $extracted . $tail . $my_struct_contents ;

}

Expand Down
2 changes: 1 addition & 1 deletion share/trick/makefiles/trickify.mk
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ TRICK_CFLAGS += $(TRICKIFY_CXX_FLAGS)
TRICK_CXXFLAGS += $(TRICKIFY_CXX_FLAGS)

# Ensure we can process all headers
TRICK_EXT_LIB_DIRS :=
TRICK_EXT_LIB_DIRS := $(TRICKIFY_EXT_LIB_DIRS)

.PHONY: all
all: $(TRICKIFY_OBJECT_NAME) $(TRICKIFY_PYTHON_DIR)
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added trick_sims/SIM_singlerigidbody/Images/Angle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added trick_sims/SIM_singlerigidbody/Images/Force.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added trick_sims/SIM_singlerigidbody/Images/Inertia.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added trick_sims/SIM_singlerigidbody/Images/Mass.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added trick_sims/SIM_singlerigidbody/Images/Radius.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added trick_sims/SIM_singlerigidbody/Images/Torque.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added trick_sims/SIM_singlerigidbody/Images/Vectora.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added trick_sims/SIM_singlerigidbody/Images/koviz.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions trick_sims/SIM_singlerigidbody/Modified_data/realtime.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

trick.frame_log_on()
trick.real_time_enable()
trick.exec_set_software_frame(0.033)
trick.itimer_enable()

trick.exec_set_enable_freeze(True)
#trick.exec_set_freeze_command(True)

#simControlPanel = trick.SimControlPanel()
#trick.add_external_application(simControlPanel)

54 changes: 54 additions & 0 deletions trick_sims/SIM_singlerigidbody/Modified_data/state_data.dr
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
global DR_GROUP_ID
global drg
try:
if DR_GROUP_ID >= 0:
DR_GROUP_ID += 1
except NameError:
DR_GROUP_ID = 0
drg = []

drg.append(trick.DRBinary("StateData"))
drg[DR_GROUP_ID].set_freq(trick.DR_Always)
drg[DR_GROUP_ID].set_cycle(0.10)
drg[DR_GROUP_ID].set_single_prec_only(False)
drg[DR_GROUP_ID].add_variable("dyn.body.force[0]")
drg[DR_GROUP_ID].add_variable("dyn.body.force[1]")
drg[DR_GROUP_ID].add_variable("dyn.body.force[2]")
drg[DR_GROUP_ID].add_variable("dyn.body.angle_force[0]")
drg[DR_GROUP_ID].add_variable("dyn.body.angle_force[1]")
drg[DR_GROUP_ID].add_variable("dyn.body.angle_force[2]")
drg[DR_GROUP_ID].add_variable("dyn.body.rotate[0][0]")
drg[DR_GROUP_ID].add_variable("dyn.body.rotate[0][1]")
drg[DR_GROUP_ID].add_variable("dyn.body.rotate[0][2]")
drg[DR_GROUP_ID].add_variable("dyn.body.rotate[1][0]")
drg[DR_GROUP_ID].add_variable("dyn.body.rotate[1][1]")
drg[DR_GROUP_ID].add_variable("dyn.body.rotate[1][2]")
drg[DR_GROUP_ID].add_variable("dyn.body.rotate[2][0]")
drg[DR_GROUP_ID].add_variable("dyn.body.rotate[2][1]")
drg[DR_GROUP_ID].add_variable("dyn.body.rotate[2][2]")
drg[DR_GROUP_ID].add_variable("dyn.body.pos[0]")
drg[DR_GROUP_ID].add_variable("dyn.body.pos[1]")
drg[DR_GROUP_ID].add_variable("dyn.body.pos[2]")
drg[DR_GROUP_ID].add_variable("dyn.body.angle[0]")
drg[DR_GROUP_ID].add_variable("dyn.body.angle[1]")
drg[DR_GROUP_ID].add_variable("dyn.body.angle[2]")
drg[DR_GROUP_ID].add_variable("dyn.body.vel[0]")
drg[DR_GROUP_ID].add_variable("dyn.body.vel[1]")
drg[DR_GROUP_ID].add_variable("dyn.body.vel[2]")
drg[DR_GROUP_ID].add_variable("dyn.body.acc[0]")
drg[DR_GROUP_ID].add_variable("dyn.body.acc[1]")
drg[DR_GROUP_ID].add_variable("dyn.body.acc[2]")
drg[DR_GROUP_ID].add_variable("dyn.body.omega[0]")
drg[DR_GROUP_ID].add_variable("dyn.body.omega[1]")
drg[DR_GROUP_ID].add_variable("dyn.body.omega[2]")
drg[DR_GROUP_ID].add_variable("dyn.body.omegaDot[0]")
drg[DR_GROUP_ID].add_variable("dyn.body.omegaDot[1]")
drg[DR_GROUP_ID].add_variable("dyn.body.omegaDot[2]")
drg[DR_GROUP_ID].add_variable("dyn.body.FORCE_INIT[0]")
drg[DR_GROUP_ID].add_variable("dyn.body.FORCE_INIT[1]")
drg[DR_GROUP_ID].add_variable("dyn.body.FORCE_INIT[2]")



trick.add_data_record_group(drg[DR_GROUP_ID], trick.DR_Buffer)
drg[DR_GROUP_ID].enable()
Loading

0 comments on commit d6e0c25

Please sign in to comment.