Skip to content

Commit

Permalink
fixing
Browse files Browse the repository at this point in the history
  • Loading branch information
brettpac committed Sep 28, 2024
2 parents 9a04655 + 184d95b commit 88ee131
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
using namespace cl_moveit2z;
using namespace cl_keyboard;


namespace sm_panda_moveit2z_cb_inventory
{

Expand Down Expand Up @@ -71,7 +72,9 @@ struct StUndoLastTrajectory;

//--------------------------------------------------------------------
//STATE_MACHINE

struct SmPandaMoveit2zCbInventory : public smacc2::SmaccStateMachineBase<SmPandaMoveit2zCbInventory, StPause1>

{
using SmaccStateMachineBase::SmaccStateMachineBase;

Expand All @@ -85,6 +88,7 @@ struct SmPandaMoveit2zCbInventory : public smacc2::SmaccStateMachineBase<SmPanda

// STATES
#include "states/st_acquire_sensors.hpp"
<<<<<<< HEAD
#include "states/st_pause_1.hpp"
#include "states/st_pause_2.hpp"
#include "states/st_pause_3.hpp"
Expand All @@ -95,6 +99,13 @@ struct SmPandaMoveit2zCbInventory : public smacc2::SmaccStateMachineBase<SmPanda
#include "states/st_move_end_effector.hpp"
#include "states/st_circular_pivot_motion.hpp"
#include "states/st_move_joints_1.hpp"
=======
#include "states/st_acquire_sensors_3.hpp"
#include "states/st_attach_object.hpp"
#include "states/st_move_end_effector.hpp"
#include "states/st_circular_pivot_motion.hpp"
#include "states/st_move_joints.hpp"
>>>>>>> humble
#include "states/st_move_joints_2.hpp"
#include "states/st_move_joints_3.hpp"
#include "states/st_detach_object.hpp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,11 @@ struct StAcquireSensors : smacc2::SmaccState<StAcquireSensors, SmPandaMoveit2zCb

// TRANSITION TABLE
typedef boost::mpl::list<

Transition<EvCbSuccess<CbWaitTopicMessage<sensor_msgs::msg::JointState>, OrArm>, StMoveKnownState1, SUCCESS>,

Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StMoveKnownState1, NEXT>



> reactions;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,14 @@ struct StEndEffectorRotate : smacc2::SmaccState<StEndEffectorRotate, SmPandaMove
// TRANSITION TABLE
typedef boost::mpl::list<


Transition<EvCbSuccess<CbEndEffectorRotate, OrArm>, StMoveKnownState1, SUCCESS>,
Transition<EvCbFailure<CbEndEffectorRotate, OrArm>, StEndEffectorRotate, SUCCESS>,

Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StMoveEndEffector, PREVIOUS>,
Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StMoveKnownState1, NEXT>


>
reactions;

Expand All @@ -59,8 +61,10 @@ struct StEndEffectorRotate : smacc2::SmaccState<StEndEffectorRotate, SmPandaMove
double deltaRadians = -M_PI * 0.1;
//std::string tipLink = "tool0";
//std::string tipLink = "wrist_3_link";

std::string tipLink = "panda_link8";


configure_orthogonal<OrArm, CbEndEffectorRotate>(deltaRadians, tipLink);
configure_orthogonal<OrKeyboard, CbDefaultKeyboardBehavior>();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ struct StMoveEndEffector : smacc2::SmaccState<StMoveEndEffector, SmPandaMoveit2z
Transition<EvCbSuccess<CbMoveEndEffector, OrArm>, StEndEffectorRotate, SUCCESS>,
Transition<EvCbFailure<CbMoveEndEffector, OrArm>, StMoveEndEffector, ABORT>,


Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StMoveJoints1, PREVIOUS>,

Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StEndEffectorRotate, NEXT>
>
reactions;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,13 @@ struct StMoveJoints1 : smacc2::SmaccState<StMoveJoints1, SmPandaMoveit2zCbInvent

// TRANSITION TABLE
typedef boost::mpl::list<

Transition<EvCbSuccess<CbMoveJoints, OrArm>, StPause3, SUCCESS>,
Transition<EvCbFailure<CbMoveJoints, OrArm>, StMoveJoints1, ABORT>,

Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StPause3, NEXT>


>
reactions;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,13 @@ struct StMoveJoints2 : smacc2::SmaccState<StMoveJoints2, SmPandaMoveit2zCbInvent

// TRANSITION TABLE
typedef boost::mpl::list<

Transition<EvCbSuccess<CbMoveJoints, OrArm>, StPause4, SUCCESS>,
Transition<EvCbFailure<CbMoveJoints, OrArm>, StMoveJoints2, ABORT>,

Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StPause4, NEXT>


>
reactions;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,13 @@ struct StMoveJoints3 : smacc2::SmaccState<StMoveJoints3, SmPandaMoveit2zCbInvent

// TRANSITION TABLE
typedef boost::mpl::list<

Transition<EvCbSuccess<CbMoveJoints, OrArm>, StPause5, SUCCESS>,
Transition<EvCbFailure<CbMoveJoints, OrArm>, StMoveJoints3, ABORT>,

Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StPause5, NEXT>


>
reactions;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,11 @@ struct StMoveKnownState1 : smacc2::SmaccState<StMoveKnownState1, SmPandaMoveit2z

// TRANSITION TABLE
typedef boost::mpl::list<

Transition<EvCbSuccess<CbMoveKnownState, OrArm>, StPause2, SUCCESS>,

Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StPause2, NEXT>

>
reactions;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ struct StPouringMotion : smacc2::SmaccState<StPouringMotion, SmPandaMoveit2zCbIn
Transition<EvCbSuccess<CbCircularPouringMotion, OrArm>, StMoveLastTrajectoryInitialState, SUCCESS>,
Transition<EvCbFailure<CbCircularPouringMotion, OrArm>, StMoveLastTrajectoryInitialState, ABORT>,


Transition<EvKeyPressP<CbDefaultKeyboardBehavior, OrKeyboard>, StMoveKnownState1, PREVIOUS>,

Transition<EvKeyPressN<CbDefaultKeyboardBehavior, OrKeyboard>, StMoveLastTrajectoryInitialState, NEXT>
>
reactions;
Expand Down

0 comments on commit 88ee131

Please sign in to comment.