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

AlexanderJChapa HW#7 #10

Open
wants to merge 22 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
2c25297
AlexanderJChapa HW#1
AlexanderJChapa Sep 4, 2019
3609a4a
Merge branch 'master' of github.com:jgoppert/aae497-f19
AlexanderJChapa Sep 9, 2019
1f4b9f7
Merge branch 'master' of github.com:jgoppert/aae497-f19
AlexanderJChapa Sep 11, 2019
6eb5c46
Merge branch 'master' of github.com:jgoppert/aae497-f19
AlexanderJChapa Sep 13, 2019
4380999
Merge branch 'master' of github.com:jgoppert/aae497-f19
AlexanderJChapa Sep 16, 2019
8eee2ab
Merge branch 'master' of github.com:jgoppert/aae497-f19
AlexanderJChapa Sep 18, 2019
b318c55
Merge branch 'master' of github.com:jgoppert/aae497-f19
AlexanderJChapa Sep 18, 2019
9677632
Merge branch 'master' of github.com:jgoppert/aae497-f19
AlexanderJChapa Sep 20, 2019
f3b88c6
HW#3
AlexanderJChapa Sep 21, 2019
759bca0
Merge branch 'master' of github.com:jgoppert/aae497-f19
AlexanderJChapa Sep 23, 2019
e0a5d2f
Merge branch 'master' of github.com:jgoppert/aae497-f19
AlexanderJChapa Sep 23, 2019
d66fccd
Merge branch 'master' of github.com:jgoppert/aae497-f19
AlexanderJChapa Sep 27, 2019
9fbaed6
Merge branch 'master' of github.com:jgoppert/aae497-f19
AlexanderJChapa Sep 30, 2019
dea339a
Merge branch 'master' of github.com:jgoppert/aae497-f19
AlexanderJChapa Sep 30, 2019
2a42ebd
Merge branch 'master' of github.com:jgoppert/aae497-f19
AlexanderJChapa Oct 14, 2019
3268e15
Merge branch 'master' of github.com:jgoppert/aae497-f19
AlexanderJChapa Oct 14, 2019
33678c7
Merge branch 'master' of github.com:jgoppert/aae497-f19
AlexanderJChapa Oct 16, 2019
833411d
Merge branch 'master' of github.com:jgoppert/aae497-f19
AlexanderJChapa Oct 16, 2019
2135839
Merge branch 'master' of github.com:jgoppert/aae497-f19
AlexanderJChapa Oct 21, 2019
0732471
Add homework 6.
AlexanderJChapa Oct 23, 2019
86f07d6
Merge branch 'master' of github.com:jgoppert/aae497-f19
AlexanderJChapa Oct 25, 2019
eb0e90e
Homework #7
AlexanderJChapa Oct 30, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions Untitled.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.3"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
19 changes: 19 additions & 0 deletions cpp/cmake_template/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@

project(cmake_template)
cmake_minimum_required(VERSION 3.10)

enable_testing()

find_package(gazebo)


# add_executable(hello_world hello_world.cpp)

# add_executable(my_test my_test.cpp)

# my gazebo plugin
add_library(my_gazebo_plugin SHARED my_gazebo_plugin.cpp)
target_include_directories(my_gazebo_plugin PUBLIC ${GAZEBO_INCLUDE_DIRS})
target_link_libraries(my_gazebo_plugin ${GAZEBO_LIBRARIES})

add_test(my_test my_test)
8 changes: 8 additions & 0 deletions cpp/cmake_template/Hello_world.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#include <iostream>

int main(int argc, char const *argv[])
{
std::out<<"Hello world" << std::endl;
/*code*/
return 0;
}
38 changes: 38 additions & 0 deletions cpp/cmake_template/my_gazebo_plugin.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#include <functional>
#include <gazebo/gazebo.hh>
#include <gazebo/physics/physics.hh>
#include <gazebo/common/common.hh>
#include <ignition/math/Vector3.hh>

namespace gazebo
{
class ModelPush : public ModelPlugin
{
public: void Load(physics::ModelPtr _parent, sdf::ElementPtr /*_sdf*/)
{
// Store the pointer to the model
this->model = _parent;

// Listen to the update event. This event is broadcast every
// simulation iteration.
this->updateConnection = event::Events::ConnectWorldUpdateBegin(
std::bind(&ModelPush::OnUpdate, this));
}

// Called by the world update start event
public: void OnUpdate()
{
// Apply a small linear velocity to the model.
this->model->SetLinearVel(ignition::math::Vector3d(.3, 0, 0));
}

// Pointer to the model
private: physics::ModelPtr model;

// Pointer to the update event connection
private: event::ConnectionPtr updateConnection;
};

// Register this plugin with the simulator
GZ_REGISTER_MODEL_PLUGIN(ModelPush)
}
11 changes: 11 additions & 0 deletions cpp/cmake_template/my_test.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
int main(int argc, char const *argv[])
{
std::out<<"Hello world" << std::endl;
/*code*/
int a = 1;
assert (a == 1)



return 0;
}
Loading