GithubHelp home page GithubHelp logo

antonilo / vision_locomotion Goto Github PK

View Code? Open in Web Editor NEW
69.0 69.0 10.0 525.29 MB

Project Code for the paper "Learning Visual Locomotion with Cross-Modal Supervision" (ICRA2023)

Home Page: https://antonilo.github.io/vision_locomotion/

CMake 1.37% C++ 71.12% C 0.92% Python 26.59%
computer-vision continual-learning locomotion reinforcement-learning

vision_locomotion's People

Contributors

antonilo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

vision_locomotion's Issues

Run on go1

hi! @antonilo
i had finished all settings, but i got a error when i try to roslaunch
i had run with roslaunch agile_locomotion cms_ros.launch
but when i want run next command
rostopic pub /agile_locomotion/walk std_msgs/Empty "{}" -1
i got this.:
process[agile_locomotion-1]: started with pid [3849] [ INFO] [1691047835.232579541]: Loading parameters... [ INFO] [1691047835.241519694]: [/agile_locomotion] base_path = /home/ubuntu/cms_ws/catkin_cms/src/agile_locomotion/controller/models/blind [ INFO] [1691047835.244527230]: [/agile_locomotion] vision_path = /home/ubuntu/cms_ws/catkin_cms/src/agile_locomotion/controller/models/vision [ INFO] [1691047835.248558267]: [/agile_locomotion] general/policy_id = 1200 [ INFO] [1691047835.251827438]: [/agile_locomotion] general/Kp = 46 [ INFO] [1691047835.256704960]: [/agile_locomotion] general/Kd = 0.8 [ INFO] [1691047835.259685091]: [/agile_locomotion] general/force_threshold = 25 [ INFO] [1691047835.262763905]: [/agile_locomotion] general/hip_joint_angle = 0.45 [ INFO] [1691047835.266439505]: [/agile_locomotion] general/lin_speed = 0 [ INFO] [1691047835.270164803]: [/agile_locomotion] general/max_lin_speed = 0.5 [ INFO] [1691047835.273675256]: [/agile_locomotion] general/ang_speed = 0 [ INFO] [1691047835.278020437]: [/agile_locomotion] general/max_ang_speed = 0.4 [ INFO] [1691047835.281052126]: [/agile_locomotion] general/tsteps = 50 [ INFO] [1691047835.284004734]: [/agile_locomotion] general/init_steps = 0 [ INFO] [1691047835.287700917]: [/agile_locomotion] general/testing = 0 [ INFO] [1691047835.290427720]: [/agile_locomotion] general/log = 0 [ INFO] [1691047835.293465994]: [/agile_locomotion] general/latent_size = 10 [ INFO] [1691047835.297873048]: [/agile_locomotion] general/obDim = 42 [ INFO] [1691047835.301422716]: [/agile_locomotion] visual_pred/n_g1 = 1 [ INFO] [1691047835.304696850]: [/agile_locomotion] visual_pred/using_vision = 1 [ INFO] [1691047835.304771820]: Parameters Loaded [ INFO] [1691047835.371162025]: Ros is Ready UDP Initialized. socketfd: 11 Port: 8080 /home/ubuntu/cms_ws/catkin_cms/src/agile_locomotion/controller/models/blind/mlp_1200.pt /home/ubuntu/cms_ws/catkin_cms/src/agile_locomotion/controller/models/blind/mean1200.csv /home/ubuntu/cms_ws/catkin_cms/src/agile_locomotion/controller/models/blind/var1200.csv Model loaded from /home/ubuntu/cms_ws/catkin_cms/src/agile_locomotion/controller/models/blind/mlp_1200.pt read 2170 elements -0.0239535 0.0439375 -0.12916 0.758832 -1.66217 0.0613242 0.842654 -1.70348 -0.0228252 1.0097 -1.61146 0.0425482 0.926225 -1.63034 -0.034175 -0.00407411 -0.0600386 0.0178517 0.00547594 -0.0474542 -0.00861305 0.0663182 -0.0694604 0.0182749 0.0531053 -0.0878771 -0.398974 -0.169958 -0.319639 0.254109 0.00548921 -0.370061 -0.121593 0.459505 -0.31236 0.168439 0.309663 -0.331397 -0.0870205 0.000291746 -0.0870205 0.000291746 -0.0239535 0.0439375 -0.12916 0.758832 -1.66217 0.0613242 0.842654 -1.70348 -0.0228252 1.0097 -1.61146 0.0425482 0.926225 -1.63034 -0.034175 -0.00407411 -0.0600386 0.0178517 0.00547594 -0.0474542 -0.00861305 0.0663182 -0.0694604 0.0182749 0.0531053 -0.0878771 -0.398974 -0.169958 -0.319639 0.254109 0.00548921 -0.370061 -0.121593 0.459505 -0.31236 0.168439 0.309663 -0.331397 -0.0870205 0.000291746 -0.0870205 0.000291746 -0.0239535 0.0439375 -0.12916 0.758832 -1.66217 0.0613242 0.842654 -1.70348 -0.0228252 1.0097 -1.61146 0.0425482 0.926225 -1.63034 -0.034175 -0.00407411 ... read 2170 elements 0.0154548 0.0116776 0.0184138 0.049594 0.0278942 0.0181977 0.0558888 0.0309958 0.0225005 0.0418531 0.0228641 0.0146581 0.0493584 0.0201657 9.36695 9.56942 17.3742 9.20628 8.86184 16.3252 9.10493 8.82635 13.4025 8.22132 10.5601 12.9502 0.155069 0.308698 0.310683 0.15197 0.308596 0.304845 0.177323 0.208968 0.188846 0.141731 0.282548 0.225084 0.0130294 0.0251278 0.0130294 0.0251278 0.0154548 0.0116776 0.0184138 0.049594 0.0278942 0.0181977 0.0558888 0.0309958 0.0225005 0.0418531 0.0228641 0.0146581 0.0493584 0.0201657 9.36695 9.56942 17.3742 9.20628 8.86184 16.3252 9.10493 8.82635 13.4025 8.22132 10.5601 12.9502 0.155069 0.308698 0.310683 0.15197 0.308596 0.304845 0.177323 0.208968 0.188846 0.141731 0.282548 0.225084 0.0130294 0.0251278 0.0130294 0.0251278 0.0154548 0.0116776 0.0184138 0.049594 0.0278942 0.0181977 0.0558888 0.0309958 0.0225005 0.0418531 0.0228641 0.0146581 0.0493584 0.0201657 9.36695 9.56942 ... /home/ubuntu/cms_ws/catkin_cms/src/agile_locomotion/controller/models/vision/mlp_1200.pt /home/ubuntu/cms_ws/catkin_cms/src/agile_locomotion/controller/models/vision/mean1200.csv /home/ubuntu/cms_ws/catkin_cms/src/agile_locomotion/controller/models/vision/var1200.csv Model loaded from /home/ubuntu/cms_ws/catkin_cms/src/agile_locomotion/controller/models/vision/mlp_1200.pt read 2170 elements -0.0324568 0.0626056 -0.131 0.758529 -1.62647 0.0651591 0.874964 -1.63657 -0.0282134 0.982228 -1.59791 0.0457578 0.935868 -1.62761 -0.0470667 0.0010261 -0.087897 0.0269814 0.0194737 -0.0693525 -0.0140214 0.0800436 -0.0956743 0.0292944 0.0643533 -0.0960237 -0.418023 -0.208554 -0.306892 0.266959 0.0304787 -0.302846 -0.131643 0.419291 -0.289692 0.190893 0.348675 -0.253107 -0.0678066 0.000747435 -0.0678066 0.000747435 -0.0324568 0.0626056 -0.131 0.758529 -1.62647 0.0651591 0.874964 -1.63657 -0.0282134 0.982228 -1.59791 0.0457578 0.935868 -1.62761 -0.0470667 0.0010261 -0.087897 0.0269814 0.0194737 -0.0693525 -0.0140214 0.0800436 -0.0956743 0.0292944 0.0643533 -0.0960237 -0.418023 -0.208554 -0.306892 0.266959 0.0304787 -0.302846 -0.131643 0.419291 -0.289692 0.190893 0.348675 -0.253107 -0.0678066 0.000747435 -0.0678066 0.000747435 -0.0324568 0.0626056 -0.131 0.758529 -1.62647 0.0651591 0.874964 -1.63657 -0.0282134 0.982228 -1.59791 0.0457578 0.935868 -1.62761 -0.0470667 0.0010261 ... read 2170 elements 0.0190809 0.0259078 0.0207875 0.0494777 0.0357764 0.0196531 0.058697 0.0405954 0.0255469 0.0490561 0.0229684 0.019187 0.0502801 0.0277285 10.2164 10.5676 19.035 9.78872 9.99721 19.3128 10.1362 9.79533 14.7176 9.48268 12.1181 15.7794 0.161398 0.329998 0.339974 0.157455 0.323308 0.340018 0.193207 0.26286 0.202941 0.171694 0.297858 0.294014 0.00741218 0.0200035 0.00741218 0.0200035 0.0190809 0.0259078 0.0207875 0.0494777 0.0357764 0.0196531 0.058697 0.0405954 0.0255469 0.0490561 0.0229684 0.019187 0.0502801 0.0277285 10.2164 10.5676 19.035 9.78872 9.99721 19.3128 10.1362 9.79533 14.7176 9.48268 12.1181 15.7794 0.161398 0.329998 0.339974 0.157455 0.323308 0.340018 0.193207 0.26286 0.202941 0.171694 0.297858 0.294014 0.00741218 0.0200035 0.00741218 0.0200035 0.0190809 0.0259078 0.0207875 0.0494777 0.0357764 0.0196531 0.058697 0.0405954 0.0255469 0.0490561 0.0229684 0.019187 0.0502801 0.0277285 10.2164 10.5676 ... /home/ubuntu/cms_ws/catkin_cms/src/agile_locomotion/controller/models/blind/prop_encoder_1200.pt /home/ubuntu/cms_ws/catkin_cms/src/agile_locomotion/controller/models/blind/mean1200.csv /home/ubuntu/cms_ws/catkin_cms/src/agile_locomotion/controller/models/blind/var1200.csv Model loaded from /home/ubuntu/cms_ws/catkin_cms/src/agile_locomotion/controller/models/blind/prop_encoder_1200.pt read 2170 elements -0.0239535 0.0439375 -0.12916 0.758832 -1.66217 0.0613242 0.842654 -1.70348 -0.0228252 1.0097 -1.61146 0.0425482 0.926225 -1.63034 -0.034175 -0.00407411 -0.0600386 0.0178517 0.00547594 -0.0474542 -0.00861305 0.0663182 -0.0694604 0.0182749 0.0531053 -0.0878771 -0.398974 -0.169958 -0.319639 0.254109 0.00548921 -0.370061 -0.121593 0.459505 -0.31236 0.168439 0.309663 -0.331397 -0.0870205 0.000291746 -0.0870205 0.000291746 -0.0239535 0.0439375 -0.12916 0.758832 -1.66217 0.0613242 0.842654 -1.70348 -0.0228252 1.0097 -1.61146 0.0425482 0.926225 -1.63034 -0.034175 -0.00407411 -0.0600386 0.0178517 0.00547594 -0.0474542 -0.00861305 0.0663182 -0.0694604 0.0182749 0.0531053 -0.0878771 -0.398974 -0.169958 -0.319639 0.254109 0.00548921 -0.370061 -0.121593 0.459505 -0.31236 0.168439 0.309663 -0.331397 -0.0870205 0.000291746 -0.0870205 0.000291746 -0.0239535 0.0439375 -0.12916 0.758832 -1.66217 0.0613242 0.842654 -1.70348 -0.0228252 1.0097 -1.61146 0.0425482 0.926225 -1.63034 -0.034175 -0.00407411 ... read 2170 elements 0.0154548 0.0116776 0.0184138 0.049594 0.0278942 0.0181977 0.0558888 0.0309958 0.0225005 0.0418531 0.0228641 0.0146581 0.0493584 0.0201657 9.36695 9.56942 17.3742 9.20628 8.86184 16.3252 9.10493 8.82635 13.4025 8.22132 10.5601 12.9502 0.155069 0.308698 0.310683 0.15197 0.308596 0.304845 0.177323 0.208968 0.188846 0.141731 0.282548 0.225084 0.0130294 0.0251278 0.0130294 0.0251278 0.0154548 0.0116776 0.0184138 0.049594 0.0278942 0.0181977 0.0558888 0.0309958 0.0225005 0.0418531 0.0228641 0.0146581 0.0493584 0.0201657 9.36695 9.56942 17.3742 9.20628 8.86184 16.3252 9.10493 8.82635 13.4025 8.22132 10.5601 12.9502 0.155069 0.308698 0.310683 0.15197 0.308596 0.304845 0.177323 0.208968 0.188846 0.141731 0.282548 0.225084 0.0130294 0.0251278 0.0130294 0.0251278 0.0154548 0.0116776 0.0184138 0.049594 0.0278942 0.0181977 0.0558888 0.0309958 0.0225005 0.0418531 0.0228641 0.0146581 0.0493584 0.0201657 9.36695 9.56942 ... [ INFO] [1691047839.430245843]: Received startExecutionCallback message! [Loop Start] named: udp_send period: 2(ms) run at cpu: 3 [Loop Start] named: udp_recv period: 2(ms) run at cpu: 3 agile_locomotion: ../nptl/pthread_mutex_lock.c:81: __pthread_mutex_lock: Assertion mutex->__data.__owner == 0' failed. [agile_locomotion-1] process has died [pid 3849, exit code -6, cmd /home/ubuntu/cms_ws/catkin_cms/devel/lib/agile_locomotion/agile_locomotion __name:=agile_locomotion __log:=/home/ubuntu/.ros/log/ac1a1ae2-8feb-11ec-b887-e45f01ce12ec/agile_locomotion-1.log]. log file: /home/ubuntu/.ros/log/ac1a1ae2-8feb-11ec-b887-e45f01ce12ec/agile_locomotion-1*.log all processes on machine have died, roslaunch will exit shutting down processing monitor... ... shutting down processing monitor complete

i guess it caused by memory lock, but i have changed /etc/security/limis.conf
my `/etc/security/limis.conf is here:

ubuntu soft memlock unlimited ubuntu hard memlock unlimited ubuntu soft nice eip ubuntu hard nice eip ubuntu soft rtprio 99 ubuntu hard rtprio 99

deploy in A1

Hi,
Thank you very much for sharing the code. I want to deploy the policy to the A1 robot now, but I have encountered a problem. After running the following two commands:
roslaunch agile_locomotion cms_ros.launch
rostopic pub /agile_locomotion/walk std_msgs/Empty "{}" -1
I encountered an error as follows:lock memory failed.
What's going on here? I look forward to your reply.
Thank you again!

Falling down when deployed in Go1

I tried to retrain the RMA algorithm using go1 urdf, but found that the robot would tend to lean forward or fall over. Do you have any suggestions for this?
The parameter "rl_coeff" is set to 1.
Below are the visual results of the two stages.
Trained 24,000 rounds in the first phase:

6f954b7720ad3b17d1f64b7566288f9e.mp4

Trained 1200 rounds in the second stage:

c50d966779255e6e5c0ae68f60f9954d.mp4

result graph:

teacher
student

By the way, what does the parameter "jt_mean_pos" in "Environment.hpp" mean? Will this affect go1's training?
And why do the hip joints of robots trained by the RMA algorithm tend to expand? This seems to make the gait appear unnatural.

catkin build error

hello! antonilo, amazing work for this repo!
but when i try to catkin build in my laptop, an error occur...
rrors << agile_locomotion:make /home/ubuntu/cms_ws/catkin_cms/logs/agile_locomotion/build.make.013.log /usr/bin/ld: CMakeFiles/agile_locomotion.dir/src/agile_locomotion.cpp.o: in function agile_locomotion::AgileLocomotion::loadParameters()':
agile_locomotion.cpp:(.text+0x751): undefined reference to ros::NodeHandle::NodeHandle(std::string const&, std::map<std::string, std::string, std::less<std::string>, std::allocator<std::pair<std::string const, std::string> > > const&)' /usr/bin/ld: agile_locomotion.cpp:(.text+0x852): undefined reference to ros::NodeHandle::NodeHandle(std::string const&, std::map<std::string, std::string, std::lessstd::string, std::allocator<std::pair<std::string const, std::string> > > const&)'
/usr/bin/ld: agile_locomotion.cpp:(.text+0x913): undefined reference to ros::NodeHandle::NodeHandle(std::string const&, std::map<std::string, std::string, std::less<std::string>, std::allocator<std::pair<std::string const, std::string> > > const&)' /usr/bin/ld: agile_locomotion.cpp:(.text+0x9d4): undefined reference to ros::NodeHandle::NodeHandle(std::string const&, std::map<std::string, std::string, std::lessstd::string, std::allocator<std::pair<std::string const, std::string> > > const&)'
/usr/bin/ld: agile_locomotion.cpp:(.text+0xa95): undefined reference to ros::NodeHandle::NodeHandle(std::string const&, std::map<std::string, std::string, std::less<std::string>, std::allocator<std::pair<std::string const, std::string> > > const&)' /usr/bin/ld: CMakeFiles/agile_locomotion.dir/src/agile_locomotion.cpp.o:agile_locomotion.cpp:(.text+0xb56): more undefined references to ros::NodeHandle::NodeHandle(std::string const&, std::map<std::string, std::string, std::lessstd::string, std::allocator<std::pair<std::string const, std::string> > > const&)' follow
/usr/bin/ld: CMakeFiles/agile_locomotion.dir/src/agile_locomotion.cpp.o: in function agile_locomotion::AgileLocomotion::loadParameters()': agile_locomotion.cpp:(.text+0x172a): undefined reference to ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)'
/usr/bin/ld: agile_locomotion.cpp:(.text+0x195c): undefined reference to ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)' /usr/bin/ld: agile_locomotion.cpp:(.text+0x19ce): undefined reference to ros::NodeHandle::NodeHandle(std::string const&, std::map<std::string, std::string, std::lessstd::string, std::allocator<std::pair<std::string const, std::string> > > const&)'
/usr/bin/ld: agile_locomotion.cpp:(.text+0x1a76): undefined reference to ros::NodeHandle::getParam(std::string const&, std::string&) const' /usr/bin/ld: CMakeFiles/agile_locomotion.dir/src/agile_locomotion.cpp.o: in function agile_locomotion::AgileLocomotion::AgileLocomotion(ros::NodeHandle const&, ros::NodeHandle const&)':
agile_locomotion.cpp:(.text+0x37da): undefined reference to ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)' /usr/bin/ld: agile_locomotion.cpp:(.text+0x3863): undefined reference to ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)'
/usr/bin/ld: agile_locomotion.cpp:(.text+0x38e8): undefined reference to ros::this_node::getName()' /usr/bin/ld: CMakeFiles/agile_locomotion.dir/src/agile_locomotion.cpp.o: in function agile_locomotion::AgileLocomotion::updateState()':
agile_locomotion.cpp:(.text+0x4d56): undefined reference to ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)' /usr/bin/ld: CMakeFiles/agile_locomotion.dir/src/agile_locomotion.cpp.o: in function agile_locomotion::AgileLocomotion::startWalking()':
agile_locomotion.cpp:(.text+0x6377): undefined reference to logging::Logging::createDirectories(std::string, std::string*)' /usr/bin/ld: agile_locomotion.cpp:(.text+0x63bd): undefined reference to logging::Logging::newLog(std::string const&)'
/usr/bin/ld: CMakeFiles/agile_locomotion.dir/src/agile_locomotion.cpp.o: in function agile_locomotion::AgileLocomotion::startExecutionCallback(boost::shared_ptr<std_msgs::Empty_<std::allocator<void> > const> const&)': agile_locomotion.cpp:(.text+0x6864): undefined reference to ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)'
/usr/bin/ld: CMakeFiles/agile_locomotion.dir/src/agile_locomotion.cpp.o: in function void ros::Publisher::publish<visualoco_msgs::Proprioception_<std::allocator<void> > >(visualoco_msgs::Proprioception_<std::allocator<void> > const&) const': agile_locomotion.cpp:(.text._ZNK3ros9Publisher7publishIN14visualoco_msgs15Proprioception_ISaIvEEEEEvRKT_[_ZNK3ros9Publisher7publishIN14visualoco_msgs15Proprioception_ISaIvEEEEEvRKT_]+0x2e1): undefined reference to ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)'
/usr/bin/ld: CMakeFiles/agile_locomotion.dir/src/agile_locomotion.cpp.o: in function bool quadrotor_common::getParam<std::string>(std::string const&, std::string&, ros::NodeHandle const&)': agile_locomotion.cpp:(.text._ZN16quadrotor_common8getParamISsEEbRKSsRT_RKN3ros10NodeHandleE[_ZN16quadrotor_common8getParamISsEEbRKSsRT_RKN3ros10NodeHandleE]+0x3e): undefined reference to ros::NodeHandle::getParam(std::string const&, std::string&) const'
/usr/bin/ld: agile_locomotion.cpp:(.text._ZN16quadrotor_common8getParamISsEEbRKSsRT_RKN3ros10NodeHandleE[_ZN16quadrotor_common8getParamISsEEbRKSsRT_RKN3ros10NodeHandleE]+0x13e): undefined reference to ros::console::print(ros::console::FilterBase*, void*, ros::console::levels::Level, std::basic_stringstream<char, std::char_traits<char>, std::allocator<char> > const&, char const*, int, char const*)' /usr/bin/ld: agile_locomotion.cpp:(.text._ZN16quadrotor_common8getParamISsEEbRKSsRT_RKN3ros10NodeHandleE[_ZN16quadrotor_common8getParamISsEEbRKSsRT_RKN3ros10NodeHandleE]+0x1f5): undefined reference to ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)'
/usr/bin/ld: agile_locomotion.cpp:(.text._ZN16quadrotor_common8getParamISsEEbRKSsRT_RKN3ros10NodeHandleE[_ZN16quadrotor_common8getParamISsEEbRKSsRT_RKN3ros10NodeHandleE]+0x265): undefined reference to ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)' /usr/bin/ld: agile_locomotion.cpp:(.text._ZN16quadrotor_common8getParamISsEEbRKSsRT_RKN3ros10NodeHandleE[_ZN16quadrotor_common8getParamISsEEbRKSsRT_RKN3ros10NodeHandleE]+0x37b): undefined reference to ros::console::print(ros::console::FilterBase*, void*, ros::console::levels::Level, std::basic_stringstream<char, std::char_traits, std::allocator > const&, char const*, int, char const*)'
/usr/bin/ld: CMakeFiles/agile_locomotion.dir/src/agile_locomotion.cpp.o: in function bool quadrotor_common::getParam<float>(std::string const&, float&, ros::NodeHandle const&)': agile_locomotion.cpp:(.text._ZN16quadrotor_common8getParamIfEEbRKSsRT_RKN3ros10NodeHandleE[_ZN16quadrotor_common8getParamIfEEbRKSsRT_RKN3ros10NodeHandleE]+0x3e): undefined reference to ros::NodeHandle::getParam(std::string const&, float&) const'
/usr/bin/ld: agile_locomotion.cpp:(.text._ZN16quadrotor_common8getParamIfEEbRKSsRT_RKN3ros10NodeHandleE[_ZN16quadrotor_common8getParamIfEEbRKSsRT_RKN3ros10NodeHandleE]+0x140): undefined reference to ros::console::print(ros::console::FilterBase*, void*, ros::console::levels::Level, std::basic_stringstream<char, std::char_traits<char>, std::allocator<char> > const&, char const*, int, char const*)' /usr/bin/ld: agile_locomotion.cpp:(.text._ZN16quadrotor_common8getParamIfEEbRKSsRT_RKN3ros10NodeHandleE[_ZN16quadrotor_common8getParamIfEEbRKSsRT_RKN3ros10NodeHandleE]+0x1f5): undefined reference to ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)'
/usr/bin/ld: agile_locomotion.cpp:(.text._ZN16quadrotor_common8getParamIfEEbRKSsRT_RKN3ros10NodeHandleE[_ZN16quadrotor_common8getParamIfEEbRKSsRT_RKN3ros10NodeHandleE]+0x265): undefined reference to ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)' /usr/bin/ld: agile_locomotion.cpp:(.text._ZN16quadrotor_common8getParamIfEEbRKSsRT_RKN3ros10NodeHandleE[_ZN16quadrotor_common8getParamIfEEbRKSsRT_RKN3ros10NodeHandleE]+0x37b): undefined reference to ros::console::print(ros::console::FilterBase*, void*, ros::console::levels::Level, std::basic_stringstream<char, std::char_traits, std::allocator > const&, char const*, int, char const*)'
/usr/bin/ld: CMakeFiles/agile_locomotion.dir/src/agile_locomotion.cpp.o: in function bool quadrotor_common::getParam<double>(std::string const&, double&, double const&, ros::NodeHandle const&)': agile_locomotion.cpp:(.text._ZN16quadrotor_common8getParamIdEEbRKSsRT_RKS3_RKN3ros10NodeHandleE[_ZN16quadrotor_common8getParamIdEEbRKSsRT_RKS3_RKN3ros10NodeHandleE]+0x3d): undefined reference to ros::NodeHandle::getParam(std::string const&, double&) const'
/usr/bin/ld: agile_locomotion.cpp:(.text._ZN16quadrotor_common8getParamIdEEbRKSsRT_RKS3_RKN3ros10NodeHandleE[_ZN16quadrotor_common8getParamIdEEbRKSsRT_RKS3_RKN3ros10NodeHandleE]+0x12c): undefined reference to ros::console::print(ros::console::FilterBase*, void*, ros::console::levels::Level, std::basic_stringstream<char, std::char_traits<char>, std::allocator<char> > const&, char const*, int, char const*)' /usr/bin/ld: agile_locomotion.cpp:(.text._ZN16quadrotor_common8getParamIdEEbRKSsRT_RKS3_RKN3ros10NodeHandleE[_ZN16quadrotor_common8getParamIdEEbRKSsRT_RKS3_RKN3ros10NodeHandleE]+0x1e5): undefined reference to ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)'
/usr/bin/ld: agile_locomotion.cpp:(.text._ZN16quadrotor_common8getParamIdEEbRKSsRT_RKS3_RKN3ros10NodeHandleE[_ZN16quadrotor_common8getParamIdEEbRKSsRT_RKS3_RKN3ros10NodeHandleE]+0x255): undefined reference to ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)' /usr/bin/ld: agile_locomotion.cpp:(.text._ZN16quadrotor_common8getParamIdEEbRKSsRT_RKS3_RKN3ros10NodeHandleE[_ZN16quadrotor_common8getParamIdEEbRKSsRT_RKS3_RKN3ros10NodeHandleE]+0x36e): undefined reference to ros::console::print(ros::console::FilterBase*, void*, ros::console::levels::Level, std::basic_stringstream<char, std::char_traits, std::allocator > const&, char const*, int, char const*)'
/usr/bin/ld: CMakeFiles/agile_locomotion.dir/src/agile_locomotion.cpp.o: in function bool quadrotor_common::getParam<int>(std::string const&, int&, int const&, ros::NodeHandle const&)': agile_locomotion.cpp:(.text._ZN16quadrotor_common8getParamIiEEbRKSsRT_RKS3_RKN3ros10NodeHandleE[_ZN16quadrotor_common8getParamIiEEbRKSsRT_RKS3_RKN3ros10NodeHandleE]+0x3d): undefined reference to ros::NodeHandle::getParam(std::string const&, int&) const'
/usr/bin/ld: agile_locomotion.cpp:(.text._ZN16quadrotor_common8getParamIiEEbRKSsRT_RKS3_RKN3ros10NodeHandleE[_ZN16quadrotor_common8getParamIiEEbRKSsRT_RKS3_RKN3ros10NodeHandleE]+0x12a): undefined reference to ros::console::print(ros::console::FilterBase*, void*, ros::console::levels::Level, std::basic_stringstream<char, std::char_traits<char>, std::allocator<char> > const&, char const*, int, char const*)' /usr/bin/ld: agile_locomotion.cpp:(.text._ZN16quadrotor_common8getParamIiEEbRKSsRT_RKS3_RKN3ros10NodeHandleE[_ZN16quadrotor_common8getParamIiEEbRKSsRT_RKS3_RKN3ros10NodeHandleE]+0x1e5): undefined reference to ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)'
/usr/bin/ld: agile_locomotion.cpp:(.text._ZN16quadrotor_common8getParamIiEEbRKSsRT_RKS3_RKN3ros10NodeHandleE[_ZN16quadrotor_common8getParamIiEEbRKSsRT_RKS3_RKN3ros10NodeHandleE]+0x255): undefined reference to ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)' /usr/bin/ld: agile_locomotion.cpp:(.text._ZN16quadrotor_common8getParamIiEEbRKSsRT_RKS3_RKN3ros10NodeHandleE[_ZN16quadrotor_common8getParamIiEEbRKSsRT_RKS3_RKN3ros10NodeHandleE]+0x36c): undefined reference to ros::console::print(ros::console::FilterBase*, void*, ros::console::levels::Level, std::basic_stringstream<char, std::char_traits, std::allocator > const&, char const*, int, char const*)'
/usr/bin/ld: CMakeFiles/agile_locomotion.dir/src/agile_locomotion.cpp.o: in function bool quadrotor_common::getParam<bool>(std::string const&, bool&, bool const&, ros::NodeHandle const&)': agile_locomotion.cpp:(.text._ZN16quadrotor_common8getParamIbEEbRKSsRT_RKS3_RKN3ros10NodeHandleE[_ZN16quadrotor_common8getParamIbEEbRKSsRT_RKS3_RKN3ros10NodeHandleE]+0x3d): undefined reference to ros::NodeHandle::getParam(std::string const&, bool&) const'
/usr/bin/ld: agile_locomotion.cpp:(.text._ZN16quadrotor_common8getParamIbEEbRKSsRT_RKS3_RKN3ros10NodeHandleE[_ZN16quadrotor_common8getParamIbEEbRKSsRT_RKS3_RKN3ros10NodeHandleE]+0x12b): undefined reference to ros::console::print(ros::console::FilterBase*, void*, ros::console::levels::Level, std::basic_stringstream<char, std::char_traits<char>, std::allocator<char> > const&, char const*, int, char const*)' /usr/bin/ld: agile_locomotion.cpp:(.text._ZN16quadrotor_common8getParamIbEEbRKSsRT_RKS3_RKN3ros10NodeHandleE[_ZN16quadrotor_common8getParamIbEEbRKSsRT_RKS3_RKN3ros10NodeHandleE]+0x1e5): undefined reference to ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)'
/usr/bin/ld: agile_locomotion.cpp:(.text._ZN16quadrotor_common8getParamIbEEbRKSsRT_RKS3_RKN3ros10NodeHandleE[_ZN16quadrotor_common8getParamIbEEbRKSsRT_RKS3_RKN3ros10NodeHandleE]+0x255): undefined reference to ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)' /usr/bin/ld: agile_locomotion.cpp:(.text._ZN16quadrotor_common8getParamIbEEbRKSsRT_RKS3_RKN3ros10NodeHandleE[_ZN16quadrotor_common8getParamIbEEbRKSsRT_RKS3_RKN3ros10NodeHandleE]+0x372): undefined reference to ros::console::print(ros::console::FilterBase*, void*, ros::console::levels::Level, std::basic_stringstream<char, std::char_traits, std::allocator > const&, char const*, int, char const*)'
/usr/bin/ld: CMakeFiles/agile_locomotion.dir/src/agile_locomotion.cpp.o: in function ros::SubscriptionCallbackHelperT<boost::shared_ptr<std_msgs::Empty_<std::allocator<void> > const> const&, void>::deserialize(ros::SubscriptionCallbackHelperDeserializeParams const&)': agile_locomotion.cpp:(.text._ZN3ros27SubscriptionCallbackHelperTIRKN5boost10shared_ptrIKN8std_msgs6Empty_ISaIvEEEEEvE11deserializeERKNS_43SubscriptionCallbackHelperDeserializeParamsE[_ZN3ros27SubscriptionCallbackHelperTIRKN5boost10shared_ptrIKN8std_msgs6Empty_ISaIvEEEEEvE11deserializeERKNS_43SubscriptionCallbackHelperDeserializeParamsE]+0x1e4): undefined reference to ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)'
/usr/bin/ld: CMakeFiles/agile_locomotion.dir/src/agile_locomotion.cpp.o: in function agile_locomotion::AgileLocomotion::AgileLocomotion()': agile_locomotion.cpp:(.text._ZN16agile_locomotion15AgileLocomotionC2Ev[_ZN16agile_locomotion15AgileLocomotionC5Ev]+0x84): undefined reference to ros::NodeHandle::NodeHandle(std::string const&, std::map<std::string, std::string, std::lessstd::string, std::allocator<std::pair<std::string const, std::string> > > const&)'
/usr/bin/ld: agile_locomotion.cpp:(.text._ZN16agile_locomotion15AgileLocomotionC2Ev[ZN16agile_locomotion15AgileLocomotionC5Ev]+0xd6): undefined reference to ros::NodeHandle::NodeHandle(std::string const&, std::map<std::string, std::string, std::less<std::string>, std::allocator<std::pair<std::string const, std::string> > > const&)' /usr/bin/ld: CMakeFiles/agile_locomotion.dir/src/agile_locomotion.cpp.o: in function main':
agile_locomotion.cpp:(.text.startup+0x4f): undefined reference to ros::init(int&, char**, std::string const&, unsigned int)' /usr/bin/ld: CMakeFiles/agile_locomotion.dir/src/agile_locomotion.cpp.o: in function ros::SubscriptionCallbackHelperT<boost::shared_ptr<visualoco_msgs::VisuaLatent
<std::allocator > const> const&, void>::deserialize(ros::SubscriptionCallbackHelperDeserializeParams const&)':
agile_locomotion.cpp:(.text._ZN3ros27SubscriptionCallbackHelperTIRKN5boost10shared_ptrIKN14visualoco_msgs12VisuaLatent_ISaIvEEEEEvE11deserializeERKNS_43SubscriptionCallbackHelperDeserializeParamsE[_ZN3ros27SubscriptionCallbackHelperTIRKN5boost10shared_ptrIKN14visualoco_msgs12VisuaLatent_ISaIvEEEEEvE11deserializeERKNS_43SubscriptionCallbackHelperDeserializeParamsE]+0x44c): undefined reference to ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)' collect2: error: ld returned 1 exit status make[2]: *** [CMakeFiles/agile_locomotion.dir/build.make:423: /home/ubuntu/cms_ws/catkin_cms/devel/lib/agile_locomotion/agile_locomotion] Error 1 make[1]: *** [CMakeFiles/Makefile2:320: CMakeFiles/agile_locomotion.dir/all] Error 2 make: *** [Makefile:141: all] Error 2

i guess it can not find ros package...but i am rookie for use catkin_simple, i just know a little knowledge in catkin_make...

i tried find_package(catkin_simple REQUIRED COMPONENTS roscpp std_msg...) and test add find_package(catkin REQUIRED COMPONENTS roscpp std_msg...) in controller/CMakeLists.txt, but not work, and i also use message("catkin_LIBRARIES: ${catkin_LIBRARIES}") print catkin_LIBRARIES, but $catkin_LIBRARIES is none!
so could you help me? thanks a lot!

Unitree Legged SDK Version

Hi Antonilo,

Thank you for the impressive work first, and I do really appreciate it! Here I have a question regarding the Unitree Legged SDK version. I noticed that you implement the low level controller with the official library. Actually there're quite different versions for A1. May I know which version you used for the implementation? Many thanks!

Testing on GO1

Hi,

Thank you for sharing the code. I'm currently testing the blind policy on my Unitree Go1 robot, and I made a few modifications to get it up and running. However, I have a couple of questions:

  1. I noticed that I can only remote control the robot to move forward or turn left, but I cannot move it in reverse. Is this normal, or is it an issue of a difference between A1 and Go1?

  2. If I want to retrain the policy on the Go1, could you advise me on the major adaptations I would need to make?

Thank you!

Lock memory failed

@antonilo @ashish-kmr
Hi,
Thank you for sharing the code. However, I encountered a problem when deploying and would like to ask for your advice. The error message is “lock memory failed”, I have added the permissions as you said, and also tried “sudo su”, but it still doesn’t work. I traced it back to line 311 in “src/agile_locomotion/controller/src/agile_locomotion.cpp” where “InitEnvironment();” is called.

  1. However, I can only trace back to “quadruped.h” and can’t find the definition of “InitEnvironment()”. Do you have it?
  2. I suspect it may be a version issue with “Unitree_legged_sdk”. May I ask which version you’re using?

Hi @D-jojo

          Hi @D-jojo 

As it is written in the readme, you need to follow these steps to avoid memory locking:

Since the Unitree SDK requires memory locking and high-priority process, which is not usually granted without sudo, add the following lines to /etc/security/limits.conf (reboot the robot afterwards):

unitree soft memlock unlimited
unitree hard memlock unlimited
unitree soft nice eip
unitree hard nice eip 
unitree soft rtprio 99
unitree hard rtprio 99

If that does not work for you, do these steps

su
source /PATH/TO/WORKSPACE/devel/setup.sh
roslaunch agile_locomotion cms_ros.launch

Originally posted by @antonilo in #2 (comment)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.